Fix banned response code, fix typo

This commit is contained in:
Howl 2016-07-10 20:53:06 +02:00
parent ab8e1ad7e2
commit 6926cda1ee
1 changed files with 2 additions and 2 deletions

View File

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