From 47ce43268183c0fa2b29f5e216a3360c135e0a92 Mon Sep 17 00:00:00 2001 From: Joona Hoikkala Date: Mon, 21 Nov 2016 12:59:35 +0200 Subject: [PATCH] Oh yeah --- api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.go b/api.go index e22dcbb..01ffa92 100644 --- a/api.go +++ b/api.go @@ -29,7 +29,7 @@ func (a AuthMiddleware) Serve(ctx *iris.Context) { au, err := DB.GetByUsername(username) if err == nil && CorrectPassword(password, au.Password) { // Password ok - if err := ctx.ReadJSON(&postData); err != nil { + if err := ctx.ReadJSON(&postData); err == nil { // Check that the subdomain belongs to the user if au.Subdomain == postData.Subdomain { log.Debugf("Accepted authentication from [%s]", usernameStr)