1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-05-31 10:39:23 +02:00
This commit is contained in:
binwiederhier 2022-12-14 23:11:22 -05:00
parent c35e5b33d1
commit c2f16f740b
21 changed files with 332 additions and 547 deletions
server

View file

@ -1,6 +1,7 @@
package server
import (
"heckel.io/ntfy/auth"
"net/http"
"net/netip"
"time"
@ -213,3 +214,26 @@ func (q *queryFilter) Pass(msg *message) bool {
}
return true
}
type apiAccountCreateRequest struct {
Username string `json:"username"`
Password string `json:"password"`
}
type apiAccountTokenResponse struct {
Token string `json:"token"`
}
type apiAccountSettingsPlan struct {
Id int `json:"id"`
Name string `json:"name"`
}
type apiAccountSettingsResponse struct {
Username string `json:"username"`
Role string `json:"role,omitempty"`
Plan *apiAccountSettingsPlan `json:"plan,omitempty"`
Language string `json:"language,omitempty"`
Notification *auth.UserNotificationPrefs `json:"notification,omitempty"`
Subscriptions []*auth.UserSubscription `json:"subscriptions,omitempty"`
}