Skip to content

Conversation

@EastOrb
Copy link

@EastOrb EastOrb commented Jul 14, 2023

Input Validation: The checkPayload function has been added to validate the payload for the addNote and updateNote functions. It checks if the title and content are empty and returns an error message if they are.

The code now includes authentication and authorization checks. The isAuthenticatedCaller and isAuthorizedOwner functions have been added as placeholders to represent the authentication and authorization logic. The validateCaller function is used to validate the caller's authentication, and the authenticatedAndAuthorized function is a wrapper that applies authentication and authorization checks to the functions that require them.

Input Validation: The checkPayload function has been added to validate the payload for the addNote and updateNote functions. It checks if the title and content are empty and returns an error message if they are.

The code now includes authentication and authorization checks. The isAuthenticatedCaller and isAuthorizedOwner functions have been added as placeholders to represent the authentication and authorization logic. The validateCaller function is used to validate the caller's authentication, and the authenticatedAndAuthorized function is a wrapper that applies authentication and authorization checks to the functions that require them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant