Skip to content

Commit

Permalink
Merge pull request #732 from traPtitech/image-api-log
Browse files Browse the repository at this point in the history
  • Loading branch information
H1rono authored Jan 17, 2024
2 parents ee8fc15 + ba6bd27 commit 1181c27
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions router/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ func (s *Service) GetImages(c echo.Context) error {
if gorm.IsRecordNotFoundError(err) {
return c.NoContent(http.StatusNotFound)
} else {
c.Logger().Error(err)
return c.NoContent(http.StatusInternalServerError)
}
}
Expand All @@ -39,6 +40,7 @@ func (s *Service) GetImages(c echo.Context) error {

f, err := s.Images.OpenApplicationsImage(image)
if err != nil {
c.Logger().Error(err)
return c.NoContent(http.StatusInternalServerError)
}

Expand All @@ -61,6 +63,7 @@ func (s *Service) DeleteImages(c echo.Context) error {
if gorm.IsRecordNotFoundError(err) {
return c.NoContent(http.StatusNotFound)
} else {
c.Logger().Error(err)
return c.NoContent(http.StatusInternalServerError)
}
}
Expand All @@ -80,6 +83,7 @@ func (s *Service) DeleteImages(c echo.Context) error {
}

if err = s.Images.DeleteApplicationsImage(image); err != nil {
c.Logger().Error(err)
return c.NoContent(http.StatusInternalServerError)
}

Expand Down

0 comments on commit 1181c27

Please sign in to comment.