use abstraction response

This commit is contained in:
nochill 2023-09-08 12:38:02 +07:00
parent a3039a8cc7
commit 12aa1f94b9

View File

@ -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)
}