1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-05-25 16:23:03 +02:00

Working test

This commit is contained in:
binwiederhier 2023-02-22 21:33:18 -05:00
parent 29340e7e24
commit 21b27b5dbe
5 changed files with 63 additions and 62 deletions

View file

@ -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))