From 6926cda1ee137130a2dc1c0473a68b7ab8797172 Mon Sep 17 00:00:00 2001 From: Howl Date: Sun, 10 Jul 2016 20:53:06 +0200 Subject: [PATCH] Fix banned response code, fix typo --- app/v1/token.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/v1/token.go b/app/v1/token.go index 0f61c68..0827c08 100644 --- a/app/v1/token.go +++ b/app/v1/token.go @@ -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.