mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 04:17:23 +00:00
feat: add collection
This commit is contained in:
@@ -35,6 +35,9 @@ func CreateCollection(uid uint, title string, article string, images []uint) (mo
|
||||
func UpdateCollection(id uint, title string, article string, images []uint) error {
|
||||
return db.Transaction(func(tx *gorm.DB) error {
|
||||
collection := &model.Collection{
|
||||
Model: gorm.Model{
|
||||
ID: id,
|
||||
},
|
||||
Title: title,
|
||||
Article: article,
|
||||
}
|
||||
|
Reference in New Issue
Block a user