From 12aa1f94b905668dd7a4f380041912245fca037c Mon Sep 17 00:00:00 2001 From: nochill Date: Fri, 8 Sep 2023 12:38:02 +0700 Subject: [PATCH] use abstraction response --- api/user.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/user.go b/api/user.go index b5cd1b9..c181505 100644 --- a/api/user.go +++ b/api/user.go @@ -177,10 +177,10 @@ func (server *Server) loginUser(ctx *gin.Context) { RefreshTokenExpiresAt: refreshTokenPayload.ExpiredAt, } - res := userLoginResponse{ + res := BaseApiRespond("succes", userLoginResponse{ UserTokenResponse: tokenResponse, UserMerchantResponse: newUserMerchantResponse(user), - } + }) ctx.JSON(http.StatusOK, res) }