irongit

Building a new website everyday to kickstart any new project I am recruited for.

added more weight definitions

huncholanehuncholaneauthored
parent f0c1eb7commit caa6bd7360bac8a0afde3327ff016582be065145Browse files

2 files changed, +3 -2

+1-0008_hygofitweb/app/api/generate/route.ts
@@ -67,6 +67,7 @@ export async function POST(request: Request) {
6767 if (content) {
6868 try {
6969 const data = JSON.parse(content);
70+ console.log(data);
7071 const actualDuration = data.data.reduce(
7172 (acc: number, group: { durationMinutes: number }) => {
7273 return acc + group.durationMinutes;
+2-2008_hygofitweb/lib/schemas/v4.ts
@@ -23,7 +23,7 @@ export const v4 = z.object({
2323 .number()
2424 .int()
2525 .describe(
26- "The total duration of all the exercise groups in minutes. Add up durationMinutes for all exercise groups"
26+ "The total duration of all the exercise groups in minutes. The durationMinutes of all exercise groups must add up exactly to this value."
2727 ),
2828 data: z.array(
2929 z.object({
@@ -66,7 +66,7 @@ export const v4 = z.object({
6666 .describe(
6767 "The rest time in seconds. 0 if no rest. Only the last set should have a rest on supersets, giant sets, and drop sets."
6868 ),
69- weight: z.string(),
69+ weight: z.enum(["light", "medium", "heavy", "max", "bodyweight"]),
7070 notes: z.string(),
7171 })
7272 )