docker fixes

This commit is contained in:
Ivan Rezchikov
2026-07-17 13:13:42 +03:00
parent 6cdd095b4a
commit 1b2629b5eb
5 changed files with 50 additions and 22 deletions
@@ -58,11 +58,7 @@ func (h *OAuthHandler) SessionLogin(c *gin.Context) {
redirectURL, err := h.svc.SessionLogin(c.Request.Context(), input.Session, input.Email, input.Password)
if err != nil {
if err == services.ErrInvalidGrant {
oauthErrorJSON(c, services.ErrInvalidGrant)
} else {
oauthErrorJSON(c, services.ErrAccessDenied)
}
oauthErrorJSON(c, err)
return
}
@@ -91,7 +87,7 @@ func (h *OAuthHandler) SessionAttach(c *gin.Context) {
redirectURL, err := h.svc.SessionAttach(c.Request.Context(), input.Session, accessToken)
if err != nil {
oauthErrorJSON(c, services.ErrAccessDenied)
oauthErrorJSON(c, err)
return
}
@@ -114,7 +110,12 @@ func (h *OAuthHandler) SessionApprove(c *gin.Context) {
}
if !input.Allow {
oauthErrorJSON(c, services.ErrAccessDenied)
redirectURL, err := h.svc.SessionDeny(c.Request.Context(), input.Session)
if err != nil {
oauthErrorJSON(c, err)
return
}
c.JSON(http.StatusOK, gin.H{"redirect_url": redirectURL})
return
}