fix: TS-Fehler in routes.ts (awardXP Signatur) und storage.ts (fehlende User-Felder in MemStorage)
continuous-integration/drone/push Build is passing

This commit is contained in:
NotiBot
2026-02-03 10:48:39 +01:00
parent 70de82e88f
commit 637bfb95f9
2 changed files with 18 additions and 2 deletions
+1 -2
View File
@@ -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)
// The correct one with auth + ownership check is at line ~925
});
// Notes API routes
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
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,
});
}
+17
View File
@@ -242,6 +242,19 @@ export class MemStorage implements IStorage {
workHours: insertUser.workHours || null,
availability: insertUser.availability || null,
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',
is2faEnabled: false,
otpCode: null,
@@ -250,6 +263,10 @@ export class MemStorage implements IStorage {
routineConfig: { morningTime: "09:00", eveningTime: "17:00", enabled: true },
lastMorningRoutine: null,
lastEveningRoutine: null,
apiKey: null,
lastBreakAt: null,
currentEnergyLevel: null,
todayEnergyCheckedIn: null,
};
this.users.set(id, user);
return user;