Skip to content

Commit

Permalink
♻️ /images APIでログを出すように
Browse files Browse the repository at this point in the history
  • Loading branch information
H1rono committed Jan 17, 2024
1 parent ee8fc15 commit ba6bd27
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 ba6bd27

Please sign in to comment.