File tree Expand file tree Collapse file tree 2 files changed +3
-17
lines changed
Expand file tree Collapse file tree 2 files changed +3
-17
lines changed Original file line number Diff line number Diff line change 1- import { NextRequest , NextResponse } from 'next/server' ;
1+ import { NextResponse } from 'next/server' ;
22import prisma from '@/prisma' ;
33
44export async function GET ( ) {
Original file line number Diff line number Diff line change 11import prisma from '@/prisma' ;
2+ import { User } from '@prisma/client' ;
23
34export async function createEmail ( email : string ) {
45 return await prisma . email . create ( {
@@ -24,22 +25,7 @@ export async function deleteEmail(email: string) {
2425 } ) ;
2526}
2627
27- export async function upsertUserFromEmail ( email : { id : string ; email : string } , uid : string ) {
28- return await prisma . user . upsert ( {
29- where : {
30- uid : uid ,
31- } ,
32- create : {
33- uid : uid ,
34- emailId : email . id ,
35- } ,
36- update : {
37- emailId : email . id ,
38- } ,
39- } ) ;
40- }
41-
42- export async function getUser ( uid : string ) {
28+ export async function getUser ( uid : string ) : Promise < User | null > {
4329 return await prisma . user . findUnique ( {
4430 where : {
4531 uid : uid ,
You can’t perform that action at this time.
0 commit comments