fix: use Database not Db
This commit is contained in:
parent
d36bf67e85
commit
af4a2eed4a
|
@ -109,7 +109,7 @@ func (s *StorageServiceImpl) FileExists(hash []byte) (bool, models.Upload) {
|
|||
hashStr := hex.EncodeToString(hash)
|
||||
|
||||
var upload models.Upload
|
||||
result := s.portal.Db().Model(&models.Upload{}).Where(&models.Upload{Hash: hashStr}).First(&upload)
|
||||
result := s.portal.Database().Model(&models.Upload{}).Where(&models.Upload{Hash: hashStr}).First(&upload)
|
||||
|
||||
return result.RowsAffected > 0, upload
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue