refactor: have PinByHash use PinByID
This commit is contained in:
parent
310c23b95e
commit
6545faad6a
|
@ -172,17 +172,7 @@ func (s AccountServiceImpl) PinByHash(hash string, accountID uint) error {
|
||||||
return result.Error
|
return result.Error
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a pin with the retrieved upload ID and matching account ID
|
return s.PinByID(uploadID, accountID)
|
||||||
pinQuery := models.Pin{UploadID: uploadID, UserID: accountID}
|
|
||||||
result = s.portal.Database().
|
|
||||||
Where(&pinQuery).
|
|
||||||
First(&models.Pin{})
|
|
||||||
|
|
||||||
if result.Error != nil {
|
|
||||||
return result.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s AccountServiceImpl) PinByID(uploadId uint, accountID uint) error {
|
func (s AccountServiceImpl) PinByID(uploadId uint, accountID uint) error {
|
||||||
|
|
Loading…
Reference in New Issue