how restrict user to execute function only once or 3 times in a day.
You'll need to create some inner-logic for that. For example, you can create a collection with
- User ID,
- Number of execution
Then check if the user is reached is limit.
Then any night at midnight you can create a CRON function that will empty the collection, so it's ready for the next day.
any other way.
A more complex one would be to give any user permission upon login And, then remove it after N execution.
But this is to complex for that task.
I think the best way would be to run the function within the function.
Recommended threads
- Impossible to get USER after createEmail...
Am using provider to deal with functions linked to appwrite. Here is my login. Future<String?> login(String email, String password) async { try { aw...
- Weird permission failure
when creating an account I use following methods: ``` Future<void> register(String email, String password, String username) async { final user = await accoun...
- Flutter Android oAuth is no more working
I currently don't get the oAuth login to work in flutter android. it works on ios and on web. but when try to use it on Android, i get to the point where the ca...