I have a smart contract something like this
contract Foo {
struct Post() {
....
}
mapping (uint256 => Post) private posts;
mapping (uint256 => address) private owners;
}
And I have a backend code written with Python:
post_matchings = {}
@hug.post('match/post_id/')
def match_file(file_id, post_id):
1. raise error, if caller of this endpoint is not owner of the post.
2. Do something.
How can I accomplish this? By using signatures?
Thanks for your help.