iPheNoMeNaL-oG
PPrisma
•Created by iPheNoMeNaL-oG on 7/15/2024 in #help-and-questions
Using upsert when `Notifications` table doesn't exist yet for user
I have a query to update a users notification preferences, but there's no data existing data yet inside the table. How can I change the query to accodomate that?
I assume
upsert
is what needs to be used?
For reference here is my Notifications
model
3 replies
PPrisma
•Created by iPheNoMeNaL-oG on 6/13/2024 in #help-and-questions
Updating user info in db using forms
I have a basic user model
I have a form that allows the user to update email, username, etc.
I'm using a simple update method
For those using nextjs, is it best to put this function in a server action or make an api route and call it there?
10 replies