diff --git a/package.json b/package.json index b115ec3..96ae6c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "homepage", - "version": "1.9.0", + "version": "1.10.0", "private": true, "type": "module", "scripts": { diff --git a/src/models/FoodLogEntry.ts b/src/models/FoodLogEntry.ts index 0cd4fcc..8bee99c 100644 --- a/src/models/FoodLogEntry.ts +++ b/src/models/FoodLogEntry.ts @@ -3,7 +3,7 @@ import mongoose from 'mongoose'; interface IFoodLogEntry { _id?: string; date: Date; - mealType: 'breakfast' | 'lunch' | 'dinner' | 'snack'; + mealType: 'breakfast' | 'lunch' | 'dinner' | 'snack' | 'water'; name: string; source: 'bls' | 'usda' | 'recipe' | 'custom' | 'off'; sourceId?: string; @@ -45,7 +45,7 @@ const NutritionSnapshotSchema = new mongoose.Schema({ const FoodLogEntrySchema = new mongoose.Schema( { date: { type: Date, required: true }, - mealType: { type: String, enum: ['breakfast', 'lunch', 'dinner', 'snack'], required: true }, + mealType: { type: String, enum: ['breakfast', 'lunch', 'dinner', 'snack', 'water'], required: true }, name: { type: String, required: true, trim: true }, source: { type: String, enum: ['bls', 'usda', 'recipe', 'custom', 'off'], required: true }, sourceId: { type: String }, diff --git a/src/routes/api/fitness/food-log/+server.ts b/src/routes/api/fitness/food-log/+server.ts index 541cf2f..1855cfd 100644 --- a/src/routes/api/fitness/food-log/+server.ts +++ b/src/routes/api/fitness/food-log/+server.ts @@ -4,7 +4,7 @@ import { requireAuth } from '$lib/server/middleware/auth'; import { dbConnect } from '$utils/db'; import { FoodLogEntry } from '$models/FoodLogEntry'; -const VALID_MEALS = ['breakfast', 'lunch', 'dinner', 'snack']; +const VALID_MEALS = ['breakfast', 'lunch', 'dinner', 'snack', 'water']; export const GET: RequestHandler = async ({ locals, url }) => { const user = await requireAuth(locals); diff --git a/src/routes/fitness/[nutrition=fitnessNutrition]/+page.svelte b/src/routes/fitness/[nutrition=fitnessNutrition]/+page.svelte index 99bbb2f..a661a29 100644 --- a/src/routes/fitness/[nutrition=fitnessNutrition]/+page.svelte +++ b/src/routes/fitness/[nutrition=fitnessNutrition]/+page.svelte @@ -1,7 +1,7 @@