//whitelistFunctions.js
import { query } from "./_generated/server";
import { v } from "convex/values";
export const get = query({
args: {},
handler: async (ctx) => {
return await ctx.db.query("whitelist").collect();
},
});
export const checkEmail = query({
args: { email: v.string() },
handler: async (ctx) => {
if (!ctx.args.email) {
throw new Error("Email argument is missing or undefined");
}
return await ctx.args.email;
},
});
//whitelistFunctions.js
import { query } from "./_generated/server";
import { v } from "convex/values";
export const get = query({
args: {},
handler: async (ctx) => {
return await ctx.db.query("whitelist").collect();
},
});
export const checkEmail = query({
args: { email: v.string() },
handler: async (ctx) => {
if (!ctx.args.email) {
throw new Error("Email argument is missing or undefined");
}
return await ctx.args.email;
},
});