fix: TS-Fehler in routes.ts (awardXP Signatur) und storage.ts (fehlende User-Felder in MemStorage)
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
+1
-2
@@ -1315,7 +1315,6 @@ ${activeTasksWithLabels.slice(0, 5).map(t => `- [${t.priority}] [${t.label}] ${t
|
|||||||
|
|
||||||
// BUG FIX: Removed duplicate DELETE /api/tasks/:id route (DUP-1)
|
// BUG FIX: Removed duplicate DELETE /api/tasks/:id route (DUP-1)
|
||||||
// The correct one with auth + ownership check is at line ~925
|
// The correct one with auth + ownership check is at line ~925
|
||||||
});
|
|
||||||
|
|
||||||
// Notes API routes
|
// Notes API routes
|
||||||
app.get("/api/notes", async (req, res) => {
|
app.get("/api/notes", async (req, res) => {
|
||||||
@@ -2216,7 +2215,7 @@ ${activeTasksWithLabels.slice(0, 5).map(t => `- [${t.priority}] [${t.label}] ${t
|
|||||||
|
|
||||||
// Award XP if completed
|
// Award XP if completed
|
||||||
if (challenge?.completedAt && challenge.xpReward) {
|
if (challenge?.completedAt && challenge.xpReward) {
|
||||||
await gamificationService.awardXP(userId, challenge.xpReward, 'daily_challenge', undefined, {
|
await gamificationService.awardXP(userId, 'daily_challenge', challenge.xpReward, {
|
||||||
challengeType: challenge.challengeType,
|
challengeType: challenge.challengeType,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,19 @@ export class MemStorage implements IStorage {
|
|||||||
workHours: insertUser.workHours || null,
|
workHours: insertUser.workHours || null,
|
||||||
availability: insertUser.availability || null,
|
availability: insertUser.availability || null,
|
||||||
aiEnabled: insertUser.aiEnabled ?? false,
|
aiEnabled: insertUser.aiEnabled ?? false,
|
||||||
|
adhdMode: insertUser.adhdMode ?? false,
|
||||||
|
adhdSettings: insertUser.adhdSettings ?? {
|
||||||
|
reducedAnimations: false,
|
||||||
|
largerTargets: true,
|
||||||
|
breakReminderInterval: 45,
|
||||||
|
singleTaskModeDefault: false,
|
||||||
|
positiveMessagingLevel: 'normal' as const,
|
||||||
|
hyperfocusProtection: true,
|
||||||
|
hyperfocusMaxMinutes: 90,
|
||||||
|
visualTimerEnabled: true,
|
||||||
|
quickWinThreshold: 10,
|
||||||
|
energyCheckInsEnabled: true,
|
||||||
|
},
|
||||||
language: insertUser.language ?? 'en',
|
language: insertUser.language ?? 'en',
|
||||||
is2faEnabled: false,
|
is2faEnabled: false,
|
||||||
otpCode: null,
|
otpCode: null,
|
||||||
@@ -250,6 +263,10 @@ export class MemStorage implements IStorage {
|
|||||||
routineConfig: { morningTime: "09:00", eveningTime: "17:00", enabled: true },
|
routineConfig: { morningTime: "09:00", eveningTime: "17:00", enabled: true },
|
||||||
lastMorningRoutine: null,
|
lastMorningRoutine: null,
|
||||||
lastEveningRoutine: null,
|
lastEveningRoutine: null,
|
||||||
|
apiKey: null,
|
||||||
|
lastBreakAt: null,
|
||||||
|
currentEnergyLevel: null,
|
||||||
|
todayEnergyCheckedIn: null,
|
||||||
};
|
};
|
||||||
this.users.set(id, user);
|
this.users.set(id, user);
|
||||||
return user;
|
return user;
|
||||||
|
|||||||
Reference in New Issue
Block a user