Skip to content

Commit

Permalink
Refactor database package to remove unnecessary logging statements
Browse files Browse the repository at this point in the history
  • Loading branch information
waveyboym committed Oct 21, 2024
1 parent 751f193 commit e01c7f7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions occupi-backend/pkg/database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,6 @@ func CheckCoincidingBookings(ctx *gin.Context, appsession *models.AppSession, bo
return false, err // Other errors
}

logrus.Info("Existing booking: ", existingbooking)
logrus.Info("Room id's match: ", existingbooking.RoomID == booking.RoomID)
logrus.Info("Room id to check: ", booking.RoomID)
logrus.Info("Existing room id: ", existingbooking.RoomID)

return true, nil
}

Expand Down
2 changes: 1 addition & 1 deletion occupi-backend/pkg/middleware/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ func BlockAfterHours(arg ...time.Time) gin.HandlerFunc {
http.StatusForbidden,
"Forbidden",
constants.ForbiddenCode,
fmt.Sprintf("Access denied after hours, only allowed between 08:00 and 17:00, time now is %s", now.Format("15:04")),
"Access denied after hours, only allowed between 08:00 and 17:00, time now is "+now.Format("15:04"),
gin.H{
"serverTime": now.Format("2006-01-02 15:04:05"),
"serverTimezone": now.Location().String(),
Expand Down

0 comments on commit e01c7f7

Please sign in to comment.