much 2 yearn
much 2 yearn
Explore posts from servers
DTDrizzle Team
Created by much 2 yearn on 9/25/2024 in #help
Where clause on 'with' in findMany
tried to follow docs but trying to add a where clause on the org did not work
7 replies
DTDrizzle Team
Created by much 2 yearn on 9/25/2024 in #help
Where clause on 'with' in findMany
Object literal may only specify known properties, and 'where' does not exist in type '{ columns?:
7 replies
CCConvex Community
Created by much 2 yearn on 3/17/2024 in #support-community
Best practice to get userId from from user user in function
but will
ctx.auth.getUserIdentity()?.subject
ctx.auth.getUserIdentity()?.subject
always return the userId ? So the flow would be : get userId from the auth ( "subject") , query users table with that id (to convert to
Id<"users">
Id<"users">
, then mutate with the returned
user._id
user._id
? thanks for always helping much appreciated @lee
6 replies
CCConvex Community
Created by much 2 yearn on 3/16/2024 in #support-community
Use zod schemas for argument validation
wondering if there is a better way to just just export one zod schema and type
8 replies
CCConvex Community
Created by much 2 yearn on 3/16/2024 in #support-community
Use zod schemas for argument validation
@lee would I have to store the initial schema as a regular object with zod properties then also export a z.object of the same schema?
8 replies
CCConvex Community
Created by much 2 yearn on 3/16/2024 in #support-community
Use zod schemas for argument validation
thanks for the reply btw!
8 replies
CCConvex Community
Created by much 2 yearn on 3/16/2024 in #support-community
Use zod schemas for argument validation
you are right it is a z object that i use for form validation on the front end. What is the best way to reuse this schema to work with convex ?
8 replies
CCConvex Community
Created by much 2 yearn on 3/16/2024 in #support-community
Use zod schemas for argument validation
// FORM TEMPLATE SCHEMAS
export const createTemplateSchema = z.object({
title: z.string().max(25, { message: "Max 25 characters" }).optional(),
goal: z.union([
z.literal("bodybuilding"),
z.literal("powerlifting"),
z.literal("powerbuilding"),
z.literal("mobility"),
z.literal("sport"),
z.literal("general"),
]),
format: z.union([z.literal("split"), z.literal("program")]),
weekLength: z.number().min(1).max(12),
maxWeeks: z.number(),
weeks: z.array(DaySchema),
});
// FORM TEMPLATE SCHEMAS
export const createTemplateSchema = z.object({
title: z.string().max(25, { message: "Max 25 characters" }).optional(),
goal: z.union([
z.literal("bodybuilding"),
z.literal("powerlifting"),
z.literal("powerbuilding"),
z.literal("mobility"),
z.literal("sport"),
z.literal("general"),
]),
format: z.union([z.literal("split"), z.literal("program")]),
weekLength: z.number().min(1).max(12),
maxWeeks: z.number(),
weeks: z.array(DaySchema),
});
8 replies
TTCTheo's Typesafe Cult
Created by much 2 yearn on 10/14/2023 in #questions
React Native Expo: Take photo with camera and send email with attachment
I just want to be able to take a photo, not download it to file system. I am using an android tablet. Take the photo, and attach it to an email and send it
3 replies