Fix banned response code, fix typo

This commit is contained in:
Howl 2016-07-10 20:53:06 +02:00
parent ab8e1ad7e2
commit 6926cda1ee

View File

@ -90,7 +90,7 @@ func TokenNewPOST(md common.MethodData) common.CodeMessager {
} }
const want = (common.UserPrivilegePublic | common.UserPrivilegeNormal) const want = (common.UserPrivilegePublic | common.UserPrivilegeNormal)
if (privileges & want) != want { if (privileges & want) != want {
r.Code = 200 r.Code = 402
r.Message = "That user is banned." r.Message = "That user is banned."
r.Banned = true r.Banned = true
return r return r
@ -147,7 +147,7 @@ type token struct {
} }
type tokenResponse struct { type tokenResponse struct {
common.ResponseBase common.ResponseBase
Tokens []token `json:"token"` Tokens []token `json:"tokens"`
} }
// TokenGET retrieves a list listing all the user's public tokens. // TokenGET retrieves a list listing all the user's public tokens.