Files
acc-server-manager/local/service/stateHistory.go
Fran Jurmanović 56ef5e1484 add state history
2025-05-27 20:18:58 +02:00

29 lines
675 B
Go

package service
import (
"acc-server-manager/local/model"
"acc-server-manager/local/repository"
"github.com/gofiber/fiber/v2"
)
type StateHistoryService struct {
repository *repository.StateHistoryRepository
}
func NewStateHistoryService(repository *repository.StateHistoryRepository) *StateHistoryService {
return &StateHistoryService{
repository: repository,
}
}
// GetAll
// Gets All rows from StateHistory table.
//
// Args:
// context.Context: Application context
// Returns:
// string: Application version
func (as StateHistoryService) GetAll(ctx *fiber.Ctx, id int) *[]model.StateHistory {
return as.repository.GetAll(ctx.UserContext(), id)
}