sdy

update createAccount

import { prisma } from "../../../utils";
import { prisma, generateToken } from "../../../utils";
import bcrypt from "bcryptjs";
import jwt from "jsonwebtoken";
export default {
Mutation: {
......@@ -16,12 +15,7 @@ export default {
password: encryptPw,
},
});
const token = jwt.sign(
{
id: user.id,
},
process.env.JWT_SECRET
);
const token = generateToken(user.id);
return { token, user };
},
},
......