Skip to content

Commit

Permalink
fixed error handling on no records founds
Browse files Browse the repository at this point in the history
  • Loading branch information
LucRoy committed May 17, 2023
1 parent 4de9f20 commit abef007
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/v1/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -516,12 +516,13 @@ func (s *apiV1) getUserStorageCapacity(user *util.User) (*util.UsersStorageCapac
Scan(&usage).Error; err != nil {
return usc, err
}
usc.UserId = user.ID
usc.Size = usage.TotalSize
usc.LastSyncAt = time.Now()
s.db.Save(&usc)
}

return usc, err
return usc, nil
}

// handleAdd godoc
Expand Down

0 comments on commit abef007

Please sign in to comment.