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
}
