refactor: Fix linter errors

This commit is contained in:
2025-11-04 19:52:26 +03:00
parent 8ca762cb1f
commit 180a5c2a90
8 changed files with 161 additions and 147 deletions

View File

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