:updated password reset
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
"use server";
|
"use server";
|
||||||
|
|
||||||
import { getAuth } from "@/auth/queries/getauth";
|
import { getAuth } from "@/auth/queries/getauth";
|
||||||
import { artemis, lachesis } from "@/lib/prisma";
|
import { artemis, daphnis } from "@/lib/prisma";
|
||||||
import { Argon2id } from "oslo/password";
|
import { Argon2id } from "oslo/password";
|
||||||
|
|
||||||
export const updatePassword = async (
|
export const updatePassword = async (
|
||||||
@ -22,7 +22,7 @@ export const updatePassword = async (
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Fetch user from database
|
// Fetch user from database
|
||||||
const existingUser = await lachesis.user.findUnique({
|
const existingUser = await daphnis.user.findUnique({
|
||||||
where: {
|
where: {
|
||||||
id: user.id,
|
id: user.id,
|
||||||
},
|
},
|
||||||
@ -46,7 +46,7 @@ export const updatePassword = async (
|
|||||||
const hashedPassword = await new Argon2id().hash(newPassword);
|
const hashedPassword = await new Argon2id().hash(newPassword);
|
||||||
|
|
||||||
// Update user's password
|
// Update user's password
|
||||||
await lachesis.user.update({
|
await daphnis.user.update({
|
||||||
where: {
|
where: {
|
||||||
id: user.id,
|
id: user.id,
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user