✨ Attachment has pool
This commit is contained in:
@@ -21,6 +21,14 @@ func GetAttachmentPool(id uint) (models.AttachmentPool, error) {
|
||||
return pool, nil
|
||||
}
|
||||
|
||||
func GetAttachmentPoolByAlias(alias string) (models.AttachmentPool, error) {
|
||||
var pool models.AttachmentPool
|
||||
if err := database.C.Where("alias = ?", alias).First(&pool).Error; err != nil {
|
||||
return pool, err
|
||||
}
|
||||
return pool, nil
|
||||
}
|
||||
|
||||
func GetAttachmentPoolWithUser(id uint, userId uint) (models.AttachmentPool, error) {
|
||||
var pool models.AttachmentPool
|
||||
if err := database.C.Where("id = ? AND account_id = ?", id, userId).First(&pool).Error; err != nil {
|
||||
|
Reference in New Issue
Block a user