feat: Telegram bot, notifications, profile settings, 365-day refresh tokens

This commit is contained in:
Cosmo
2026-02-06 14:11:26 +00:00
parent 9e467b0448
commit afeb3adddf
7 changed files with 448 additions and 128 deletions

View File

@@ -28,11 +28,13 @@ func (h *ProfileHandler) Get(w http.ResponseWriter, r *http.Request) {
user.ProcessForJSON()
// Return only profile fields
profile := map[string]interface{}{
"username": user.Username,
"telegram_chat_id": user.TelegramChatIDValue,
"notifications_enabled": user.NotificationsEnabled,
"timezone": user.Timezone,
"morning_reminder_time": user.MorningTime,
"evening_reminder_time": user.EveningTime,
}
writeJSON(w, profile, http.StatusOK)
@@ -63,9 +65,12 @@ func (h *ProfileHandler) Update(w http.ResponseWriter, r *http.Request) {
user.ProcessForJSON()
profile := map[string]interface{}{
"username": user.Username,
"telegram_chat_id": user.TelegramChatIDValue,
"notifications_enabled": user.NotificationsEnabled,
"timezone": user.Timezone,
"morning_reminder_time": user.MorningTime,
"evening_reminder_time": user.EveningTime,
}
writeJSON(w, profile, http.StatusOK)