Files
website/server/api/auth/reset-password.post.ts

13 lines
353 B
TypeScript

import { ResetPasswordSchema } from "~~/shared/api-types";
export default defineEventHandler(async (event): Promise<void> => {
const body = await readZodBody(event, ResetPasswordSchema);
const grpc = useApiGrpc(event);
await grpc.resetPassword({
password: body.password,
passwordConfirm: body.passwordConfirm,
token: body.resetToken,
})
});