Skip to content
This repository has been archived by the owner on Nov 3, 2024. It is now read-only.

Commit

Permalink
validate if applicant_user_id exists
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Nov 23, 2023
1 parent 0456d3f commit 0f65077
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions work.pomelo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ void pomelo::approve( const name bounty_id, const name applicant_user_id )
eosn::login::require_auth_user_id( bounty.author_user_id, get_configs().login_contract );

// validate input
check( eosn::login::is_user_id_exists( applicant_user_id, get_configs().login_contract ), "pomelo::approve: [applicant_user_id] does not exists");
check( bounty.status == "open"_n, "pomelo::approve: [bounty.status] must be `open` to `approve`" );
check( bounty.applicant_user_ids.find( applicant_user_id ) != bounty.applicant_user_ids.end(), "pomelo::approve: [applicant_user_id] did not apply" );

Expand Down

0 comments on commit 0f65077

Please sign in to comment.