Skip to content

Commit

Permalink
fix: info -> debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
jmattheis committed Jan 9, 2024
1 parent bc6eb0f commit a26a7c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions auth/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ func reqisterUser(request *http.Request, writer http.ResponseWriter, db *gorm.DB

device := &model.Device{}
if db.Where("token = ?", token).Find(device).RecordNotFound() {
log.Info().Str("token", token).Msg("No device with token found")
log.Debug().Str("token", token).Msg("No device with token found")
return request
}

user := &model.User{}
if db.Find(user, device.UserID).RecordNotFound() {
log.Panic().Int("userID", device.UserID).Int("deviceID", device.ID).Msg("User not found")
}
log.Info().Int("userid", device.UserID).Str("username", user.Name).Msg("User found")
log.Debug().Int("userid", device.UserID).Str("username", user.Name).Msg("User found")

impersonate := request.Header.Get("X-Traggo-Impersonate")
if impersonate != "" {
Expand Down

0 comments on commit a26a7c3

Please sign in to comment.