export const get = query({
handler: async (ctx) => {
const userId = await getAuthUserId(ctx);
if (userId === null) {
throw new Error("Not signed in");
}
return await ctx.db
.query("notepads")
.filter((q) => q.eq(q.field("userId"), userId))
.order("desc")
.collect();
},
});
export const get = query({
handler: async (ctx) => {
const userId = await getAuthUserId(ctx);
if (userId === null) {
throw new Error("Not signed in");
}
return await ctx.db
.query("notepads")
.filter((q) => q.eq(q.field("userId"), userId))
.order("desc")
.collect();
},
});