update additional field on user object via route handler
in my route handler, how can i update this additional value?
is there a method in the api, or do i just update the document by querying mongodb:
6 Replies
in a database after hook you could set this
So after they save something to db, do I make a after hook? And in that it edits the database field of the user array in mongo? What would the condition to run it be
idk depends on your goal
I just wanna add a field to the user after they upload something to my site
I believe you miss understood him, in Better-Auth, we have database hooks:
https://www.better-auth.com/docs/concepts/database#database-hooks
Database | Better Auth
Learn how to use a database with Better Auth.
Ahh I see thanks