and AI recommnedation fix
This commit is contained in:
dimitar committed 2025-12-12 01:32:52 +01:00
1 parent 670e6675cc
commit 8353a24f6b
17 files changed
+134 -138

No files matched your search

+2 -2
View File
@@ -246,7 +246,7 @@ export class DrizzleDatabase implements IDatabase {
}
// Fitness Profile operations
async createFitnessProfile(profileData: Omit<FitnessProfile, 'createdAt' | 'updatedAt'>): Promise<FitnessProfile> {
async createFitnessProfile(profileData: Omit<FitnessProfile, 'id' | 'createdAt' | 'updatedAt'>): Promise<FitnessProfile> {
const now = new Date()
const id = Math.random().toString(36).substr(2, 9)
const newProfile = {
@@ -257,7 +257,7 @@ export class DrizzleDatabase implements IDatabase {
}
await this.db.insert(fitnessProfiles).values(newProfile as any)
return { ...profileData, createdAt: now, updatedAt: now }
return { id, ...profileData, createdAt: now, updatedAt: now }
}
async getFitnessProfileByUserId(userId: string): Promise<FitnessProfile | null> {