feat: category routes
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user