refactor: Fix linter errors
This commit is contained in:
@@ -19,7 +19,11 @@ func (c *PlainAuthController) Handler() gin.HandlerFunc {
|
||||
var payload dto.LoginRequest
|
||||
|
||||
if err := ginCtx.ShouldBindJSON(&payload); err != nil {
|
||||
sendErr := httpApp.NewResponseErrBuilder().WithStatusCode(http.StatusBadRequest).WithMessage(err.Error()).Send(ginCtx)
|
||||
sendErr := httpApp.
|
||||
NewResponseErrBuilder().
|
||||
WithStatusCode(http.StatusBadRequest).
|
||||
WithMessage(err.Error()).
|
||||
Send(ginCtx)
|
||||
if sendErr != nil {
|
||||
ginCtx.Writer.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
@@ -30,7 +34,11 @@ func (c *PlainAuthController) Handler() gin.HandlerFunc {
|
||||
|
||||
jwtString, err := c.authModule.Proceed(ginCtx.Request.Context(), payload.Login, payload.Password)
|
||||
if err != nil {
|
||||
sendErr := httpApp.NewResponseErrBuilder().WithStatusCode(http.StatusBadRequest).WithMessage(err.Error()).Send(ginCtx)
|
||||
sendErr := httpApp.
|
||||
NewResponseErrBuilder().
|
||||
WithStatusCode(http.StatusBadRequest).
|
||||
WithMessage(err.Error()).
|
||||
Send(ginCtx)
|
||||
if sendErr != nil {
|
||||
ginCtx.Writer.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user