@kazion/create-app
Version:
A cli tool to help you get started with graphql and rest api's with typescript
18 lines (16 loc) • 392 B
text/typescript
import { prisma } from "~/libs/prisma";
import { RegisterPayload } from "../auth/auth.schemas";
export class UsersService {
static async createUser(payload: RegisterPayload) {
return await prisma.user.create({
data: payload,
});
}
static async getUserByEmail(email: string) {
return await prisma.user.findUnique({
where: {
email,
},
});
}
}