how can I call these actions inside crypto verifySecret function?
"use node";
import { action } from "./_generated/server";
import { v } from "convex/values";
import hasher from "wordpress-hash-node";
export const hashPassword = action({
args: { password: v.string() },
handler: async (ctx, args) => {
const hash = hasher.HashPassword(args.password);
return hash;
},
});
export const checkPassword = action({
args: { password: v.string(), hash: v.string() },
handler: async (ctx, args) => {
const checked = hasher.CheckPassword(args.password, args.hash);
return checked;
},
});
"use node";
import { action } from "./_generated/server";
import { v } from "convex/values";
import hasher from "wordpress-hash-node";
export const hashPassword = action({
args: { password: v.string() },
handler: async (ctx, args) => {
const hash = hasher.HashPassword(args.password);
return hash;
},
});
export const checkPassword = action({
args: { password: v.string(), hash: v.string() },
handler: async (ctx, args) => {
const checked = hasher.CheckPassword(args.password, args.hash);
return checked;
},
});
0 Replies