mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-06-16 09:33:18 +02:00
Associate messages with a user
This commit is contained in:
parent
84785b7a60
commit
2b78a8cb51
7 changed files with 71 additions and 41 deletions
server
|
@ -75,19 +75,18 @@ func (s *Server) handleAccountGet(w http.ResponseWriter, r *http.Request, v *vis
|
|||
Code: v.user.Plan.Code,
|
||||
Upgradable: v.user.Plan.Upgradable,
|
||||
}
|
||||
} else if v.user.Role == auth.RoleAdmin {
|
||||
response.Plan = &apiAccountPlan{
|
||||
Code: string(auth.PlanUnlimited),
|
||||
Upgradable: false,
|
||||
}
|
||||
} else {
|
||||
if v.user.Role == auth.RoleAdmin {
|
||||
response.Plan = &apiAccountPlan{
|
||||
Code: string(auth.PlanUnlimited),
|
||||
Upgradable: false,
|
||||
}
|
||||
} else {
|
||||
response.Plan = &apiAccountPlan{
|
||||
Code: string(auth.PlanDefault),
|
||||
Upgradable: true,
|
||||
}
|
||||
response.Plan = &apiAccountPlan{
|
||||
Code: string(auth.PlanDefault),
|
||||
Upgradable: true,
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
response.Username = auth.Everyone
|
||||
response.Role = string(auth.RoleAnonymous)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue