feat: category routes

This commit is contained in:
ericprd
2025-03-01 21:20:51 +08:00
parent acd80480dd
commit bdf6dd131e
19 changed files with 368 additions and 52 deletions
+13
View File
@@ -0,0 +1,13 @@
package categoryrepository
import categorydomain "legalgo-BE-go/internal/domain/category"
func (a *accessor) GetAll() ([]categorydomain.Category, error) {
var categories []categorydomain.Category
if err := a.DB.Find(&categories).Error; err != nil {
return nil, err
}
return categories, nil
}