mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-05-25 16:23:03 +02:00
Working test
This commit is contained in:
parent
29340e7e24
commit
21b27b5dbe
5 changed files with 63 additions and 62 deletions
server
|
@ -26,8 +26,8 @@ func (s *Server) limitRequestsWithTopic(next handleFunc) handleFunc {
|
|||
return err
|
||||
}
|
||||
vrate := v
|
||||
if topicCountsAgainst := t.Billee(); topicCountsAgainst != nil {
|
||||
vrate = topicCountsAgainst
|
||||
if rateVisitor := t.RateVisitor(); rateVisitor != nil {
|
||||
vrate = rateVisitor
|
||||
}
|
||||
r = r.WithContext(context.WithValue(context.WithValue(r.Context(), "vRate", vrate), "topic", t))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue