mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-04-04 13:47:36 +03:00
Reserve dialogs
This commit is contained in:
parent
259293f9b3
commit
07cdf2bc7a
13 changed files with 587 additions and 397 deletions
|
@ -447,6 +447,12 @@ func (s *Server) handleAccountReservationDelete(w http.ResponseWriter, r *http.R
|
|||
if err := s.userManager.RemoveReservations(u.Name, topic); err != nil {
|
||||
return err
|
||||
}
|
||||
deleteMessages := readBoolParam(r, false, "X-Delete-Messages", "Delete-Messages")
|
||||
if deleteMessages {
|
||||
if err := s.messageCache.ExpireMessages(topic); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return s.writeJSON(w, newSuccessResponse())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue