From 0c5827ce0b892ccb17f78331a23db07bb9544958 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Tue, 16 Jan 2024 01:17:46 -0500 Subject: [PATCH] Revert "fix: try to deref?" This reverts commit a19af267cf1b85ef0f6be31cd80da7720ba6ef9d. --- storage/storage.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/storage/storage.go b/storage/storage.go index 101e4b2..5b5592e 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -109,10 +109,7 @@ func (s *StorageServiceImpl) FileExists(hash []byte) (bool, models.Upload) { hashStr := hex.EncodeToString(hash) var upload models.Upload - - db := *s.portal.Db() - - result := db.Model(&models.Upload{}).Where(&models.Upload{Hash: hashStr}).First(&upload) + result := s.portal.Db().Model(&models.Upload{}).Where(&models.Upload{Hash: hashStr}).First(&upload) return result.RowsAffected > 0, upload }