NEAR-DevHub / neardevhub-contract

DevHub Portal Product Contract (Hosted on NEAR Blockchain) – Includes other instances (e.g. Infrastructure, Events)
https://neardevhub.org
19 stars 15 forks source link

fix: removed is_allowed_to_moderate and use has_moderator #56

Closed Tguntenaar closed 1 year ago

Tguntenaar commented 1 year ago

Problem:

Both @carina-akaia and I created a function to check if a moderator has access to call a function. Carina named it has_moderator, because self is a Contract, which makes it more semantically clear: contract.has_moderator(account_id)

Solution:

I refactored the code and removed the function is_allowed_to_moderate and replaced with has_moderator.