Properly handle error and improve error messages

This commit is contained in:
2024-09-21 11:26:25 +07:00
parent 557e7313b2
commit bcdcbd5049
25 changed files with 258 additions and 234 deletions

View File

@ -59,11 +59,12 @@ func (r *Service) GetUser(ctx context.Context, email string) (*models.User, erro
return &user, nil
}
func (r *Service) DeleteUser(email string) {
func (r *Service) DeleteUser(email string) error {
err := r.cache.DeleteCache(context.Background(), "UserCache:"+email)
if err != nil {
return
return err
}
return nil
}
func (r *Service) GetUserStorageUsage(ownerID string) (uint64, error) {