feat: add Discord reminder and timezone settings
This commit is contained in:
@@ -325,7 +325,7 @@ export class HabitService {
|
||||
data: days.map(d => ({ day: d.date, value: d.future ? -2 : d.ratio === null ? -1 : d.level! })) };
|
||||
}
|
||||
setTimezone(timezone: string) {
|
||||
this.db.update(users).set({ timezone, updatedAt: this.now }).where(eq(users.id, this.user.id)).run();
|
||||
this.db.update(users).set({ timezone, updatedAt: sql`max(${users.updatedAt} + 1, ${this.now})` }).where(eq(users.id, this.user.id)).run();
|
||||
return { ...this.user, timezone };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user