feat: update and delete tags and categories
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package categoryrepository
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
categorydomain "legalgo-BE-go/internal/domain/category"
|
||||
)
|
||||
|
||||
func (a *accessor) Delete(id string) error {
|
||||
if err := a.DB.Delete(&categorydomain.Category{}, "id = ?", id).Error; err != nil {
|
||||
return fmt.Errorf("failed to delete category %s : %v", id, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user