mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-06-23 12:58:04 +02:00
Cont'd Twilio stuff
This commit is contained in:
parent
deb4f24856
commit
7c574d73de
16 changed files with 240 additions and 236 deletions
server
|
@ -85,6 +85,15 @@ func (s *Server) ensureAdmin(next handleFunc) handleFunc {
|
|||
})
|
||||
}
|
||||
|
||||
func (s *Server) ensureCallsEnabled(next handleFunc) handleFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request, v *visitor) error {
|
||||
if s.config.TwilioAccount == "" {
|
||||
return errHTTPNotFound
|
||||
}
|
||||
return next(w, r, v)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Server) ensurePaymentsEnabled(next handleFunc) handleFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request, v *visitor) error {
|
||||
if s.config.StripeSecretKey == "" || s.stripe == nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue