mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-05-30 10:25:40 +02:00
A few manager tests
This commit is contained in:
parent
73b0161ff7
commit
8bf64d8723
5 changed files with 169 additions and 6 deletions
server
|
@ -447,7 +447,7 @@ func (s *Server) handleAccountReservationAdd(w http.ResponseWriter, r *http.Requ
|
|||
// Check if we are allowed to reserve this topic
|
||||
if u.IsUser() && u.Tier == nil {
|
||||
return errHTTPUnauthorized
|
||||
} else if err := s.userManager.CheckAllowAccess(u.Name, req.Topic); err != nil {
|
||||
} else if err := s.userManager.AllowReservation(u.Name, req.Topic); err != nil {
|
||||
return errHTTPConflictTopicReserved
|
||||
} else if u.IsUser() {
|
||||
hasReservation, err := s.userManager.HasReservation(u.Name, req.Topic)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue