feat(scheduling): add expired loyalty cleanup and extend guest anonymization
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -317,6 +317,11 @@ func GetAvailableHours(w http.ResponseWriter, r *http.Request) {
|
||||
log.Printf("Failed to anonymize stale guest accounts: %v", err)
|
||||
}
|
||||
|
||||
// Clean up expired loyalty redemptions (pending past expires_at)
|
||||
if err := CleanupExpiredLoyaltyRedemptions(r.Context()); err != nil {
|
||||
log.Printf("Failed to cleanup expired loyalty redemptions: %v", err)
|
||||
}
|
||||
|
||||
// Load default hours
|
||||
defaultMap := map[int]DefaultHours{}
|
||||
defRows, _ := db.DB.Query(r.Context(), `SELECT weekday, start_time::text, end_time::text, is_open FROM working_hours`)
|
||||
|
||||
Reference in New Issue
Block a user