- Updated league handling to ensure valid page size checks and improved error handling for sport ID parsing. - Introduced new endpoint to update global league settings with comprehensive validation and error logging. - Refactored odds settings management, including saving, removing, and updating odds settings with enhanced validation. - Added tenant slug retrieval by token, ensuring proper user and company validation. - Improved middleware to check for active company status and adjusted route permissions for various endpoints. - Added SQL script to fix auto-increment desynchronization across multiple tables.
18 lines
768 B
Go
18 lines
768 B
Go
package league
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/SamuelTariku/FortuneBet-Backend/internal/domain"
|
|
)
|
|
|
|
type Service interface {
|
|
SaveLeague(ctx context.Context, league domain.CreateLeague) error
|
|
SaveLeagueSettings(ctx context.Context, leagueSettings domain.CreateLeagueSettings) error
|
|
GetAllLeagues(ctx context.Context, filter domain.LeagueFilter) ([]domain.BaseLeague, error)
|
|
GetAllLeaguesByCompany(ctx context.Context, companyID int64, filter domain.LeagueFilter) ([]domain.LeagueWithSettings, int64, error)
|
|
CheckLeagueSupport(ctx context.Context, leagueID int64, companyID int64) (bool, error)
|
|
UpdateLeague(ctx context.Context, league domain.UpdateLeague) error
|
|
UpdateGlobalLeagueSettings(ctx context.Context, league domain.UpdateGlobalLeagueSettings) error
|
|
}
|