mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-11 08:43:04 +00:00
feat: removing registration restrictions
Anyone can now register
This commit is contained in:
15
src/lib/user/updateUser.ts
Normal file
15
src/lib/user/updateUser.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import prisma from "../../utils/prisma";
|
||||
import { Profile } from "next-auth";
|
||||
|
||||
export default async function updateUser(profile: Profile) {
|
||||
return await prisma.user.update({
|
||||
where: {
|
||||
email: profile.email,
|
||||
google_id: profile.sub
|
||||
},
|
||||
data: {
|
||||
email: profile.email,
|
||||
google_id: profile.sub
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user