parent
a19af267cf
commit
0c5827ce0b
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue