修复删除资源时未删除与用户关系的bug

This commit is contained in:
dushixiang
2021-02-12 19:07:36 +08:00
parent 6b2388b422
commit b1b8604061
7 changed files with 31 additions and 9 deletions

View File

@ -77,6 +77,6 @@ func UpdateCommandById(o *Command, id string) {
global.DB.Updates(o)
}
func DeleteCommandById(id string) {
global.DB.Where("id = ?", id).Delete(&Command{})
func DeleteCommandById(id string) error {
return global.DB.Where("id = ?", id).Delete(&Command{}).Error
}