From 71b31638277a1fda0f061fa1620b8dfca72ba469 Mon Sep 17 00:00:00 2001 From: crusader Date: Wed, 7 Mar 2018 21:04:28 +0900 Subject: [PATCH] ing --- commons/{error_response.go => response.go} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename commons/{error_response.go => response.go} (79%) diff --git a/commons/error_response.go b/commons/response.go similarity index 79% rename from commons/error_response.go rename to commons/response.go index 4084c95..ec73652 100644 --- a/commons/error_response.go +++ b/commons/response.go @@ -7,14 +7,14 @@ import ( ) func SendRESTResponse(ctx *fasthttp.RequestCtx, response interface{}) { - ctx.SetContentType("application/javascript") + ctx.SetContentType("application/json") jRes, _ := json.Marshal(response) ctx.SetBody(jRes) } func SendRESTError(ctx *fasthttp.RequestCtx, statusCode int, err error) { - ctx.SetContentType("application/javascript") + ctx.SetContentType("application/json") ctx.SetStatusCode(statusCode) jRes, _ := json.Marshal(err)