fix: try to deref?
This commit is contained in:
parent
58f734d3b3
commit
a19af267cf
|
@ -109,7 +109,10 @@ func (s *StorageServiceImpl) FileExists(hash []byte) (bool, models.Upload) {
|
||||||
hashStr := hex.EncodeToString(hash)
|
hashStr := hex.EncodeToString(hash)
|
||||||
|
|
||||||
var upload models.Upload
|
var upload models.Upload
|
||||||
result := s.portal.Db().Model(&models.Upload{}).Where(&models.Upload{Hash: hashStr}).First(&upload)
|
|
||||||
|
db := *s.portal.Db()
|
||||||
|
|
||||||
|
result := db.Model(&models.Upload{}).Where(&models.Upload{Hash: hashStr}).First(&upload)
|
||||||
|
|
||||||
return result.RowsAffected > 0, upload
|
return result.RowsAffected > 0, upload
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue