reporting/src/reporting.cpp
ACTION reporting::updateprice(name reporter, uint64_t itemKey, uint64_t price) {
  require_auth( reporter );
	user_t users( _self, _self.value );
	auto it_reporter = users.find(reporter.value);
	check( !(it_reporter == users.end()), "No such user on the blockchain.");
	check( !(it_reporter->frozen), "This user is frozen.");
  
  item_t item( _self, _self.value );
	auto it_item = item.find(itemKey);
	check( !(it_item == item.end()), "No such item on the blockchain.");
	check( it_item->reporter == reporter, "Cannot set price for items owned by other users.");
	item.modify(it_item, _self, [&]( auto& row ) { 
	  row.price = price;
	});
}
/**
 * Allows the user to update the price for the threat intelligence data.
 * Nothing special to expect.
 */
Allows the user to update the price for the threat intelligence data.
Nothing special to expect.
Allows the user to update the price for the threat intelligence data . Nothing special to expect .
ACTION reporting::updateprice(name reporter, uint64_t itemKey, uint64_t price) {
  require_auth( reporter );
	user_t users( _self, _self.value );
	auto it_reporter = users.find(reporter.value);
	check( !(it_reporter == users.end()), "No such user on the blockchain.");
	check( !(it_reporter->frozen), "This user is frozen.");
  item_t item( _self, _self.value );
	auto it_item = item.find(itemKey);
	check( !(it_item == item.end()), "No such item on the blockchain.");
	check( it_item->reporter == reporter, "Cannot set price for items owned by other users.");
	item.modify(it_item, _self, [&]( auto& row ) { 
	  row.price = price;
	});
}
ACTION reporting :: updateprice ( name reporter , uint64_t itemKey , uint64_t price ) { require_auth ( reporter ) ; user_t users ( _self , _self . value ) ; auto it_reporter = users . find ( reporter . value ) ; check ( ! ( it_reporter == users . end ( ) ) , " " ) ; check ( ! ( it_reporter -> frozen ) , " " ) ; item_t item ( _self , _self . value ) ; auto it_item = item . find ( itemKey ) ; check ( ! ( it_item == item . end ( ) ) , " " ) ; check ( it_item -> reporter == reporter , " " ) ; item . modify ( it_item , _self , [ & ] ( auto & row ) { row . price = price ; } ) ; }
Allows the user to update the price for the threat intelligence data.
Allows the user to update the price for the threat intelligence data .