mirror of
https://github.com/getAlby/lndhub.go.git
synced 2025-12-20 06:05:08 +01:00
Return bad auth error response properly
This commit is contained in:
@@ -43,7 +43,7 @@ func (controller *AuthController) Auth(c echo.Context) error {
|
|||||||
|
|
||||||
accessToken, refreshToken, err := controller.svc.GenerateToken(c.Request().Context(), body.Login, body.Password, body.RefreshToken)
|
accessToken, refreshToken, err := controller.svc.GenerateToken(c.Request().Context(), body.Login, body.Password, body.RefreshToken)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return c.JSON(http.StatusBadRequest, responses.BadAuthError)
|
||||||
}
|
}
|
||||||
|
|
||||||
return c.JSON(http.StatusOK, &AuthResponseBody{
|
return c.JSON(http.StatusOK, &AuthResponseBody{
|
||||||
|
|||||||
Reference in New Issue
Block a user