Compare commits
3 Commits
2b39d32799
...
ddc115f4a8
Author | SHA1 | Date | |
---|---|---|---|
ddc115f4a8 | |||
12aa1f94b9 | |||
a3039a8cc7 |
@ -60,7 +60,7 @@ func (server *Server) renewAccessToken(ctx *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if time.Now().After(refreshPayload.ExpiredAt) {
|
if time.Now().After(refreshPayload.ExpiredAt) {
|
||||||
err := fmt.Errorf("Exprired session")
|
err := fmt.Errorf("Expired session")
|
||||||
ctx.JSON(http.StatusUnauthorized, errorResponse(err, ""))
|
ctx.JSON(http.StatusUnauthorized, errorResponse(err, ""))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -177,10 +177,10 @@ func (server *Server) loginUser(ctx *gin.Context) {
|
|||||||
RefreshTokenExpiresAt: refreshTokenPayload.ExpiredAt,
|
RefreshTokenExpiresAt: refreshTokenPayload.ExpiredAt,
|
||||||
}
|
}
|
||||||
|
|
||||||
res := userLoginResponse{
|
res := BaseApiRespond("succes", userLoginResponse{
|
||||||
UserTokenResponse: tokenResponse,
|
UserTokenResponse: tokenResponse,
|
||||||
UserMerchantResponse: newUserMerchantResponse(user),
|
UserMerchantResponse: newUserMerchantResponse(user),
|
||||||
}
|
})
|
||||||
|
|
||||||
ctx.JSON(http.StatusOK, res)
|
ctx.JSON(http.StatusOK, res)
|
||||||
}
|
}
|
||||||
|
@ -10,8 +10,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type SaleOrderProduct struct {
|
type SaleOrderProduct struct {
|
||||||
ProductID uuid.UUID `json:"product_id"`
|
ProductID uuid.UUID `json:"id"`
|
||||||
ProductName string `json:"product_name"`
|
ProductName string `json:"name"`
|
||||||
Quantity float64 `json:"quantity"`
|
Quantity float64 `json:"quantity"`
|
||||||
Sub_total float64 `json:"sub_total"`
|
Sub_total float64 `json:"sub_total"`
|
||||||
Price float64 `json:"price"`
|
Price float64 `json:"price"`
|
||||||
|
Loading…
Reference in New Issue
Block a user