Skip to content

Commit

Permalink
Fix daily_questions
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaptoss committed Sep 10, 2024
1 parent b8a2e0d commit 5649ec2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/service/handlers/daily_question_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ func DeleteDailyQuestion(w http.ResponseWriter, r *http.Request) {
return
}

if !timeReq.After(time.Date(nowTime.Year(), nowTime.Month(), nowTime.Day(), 0, 0, 0, 0, location).Add(time.Hour * 24)) {
DailyQuestions(r).ClearDeadlines()
}

_, err = DailyQuestionsQ(r).New().FilterByID(ID).Delete()
if err != nil {
Log(r).WithError(err).Error("Error deleting daily question")
Expand Down

0 comments on commit 5649ec2

Please sign in to comment.