ms-tester/internal/languages/usecase/usecase.go
Vyacheslav1557 4cdd751b16 fix:
2024-10-10 00:04:37 +05:00

26 lines
597 B
Go

package usecase
import (
"context"
"git.sch9.ru/new_gate/models"
"git.sch9.ru/new_gate/ms-tester/internal/languages"
)
type LanguageUseCase struct {
languageRepo languages.LanguageRepository
}
func NewLanguageUseCase(
languageRepo languages.LanguageRepository,
) *LanguageUseCase {
return &LanguageUseCase{
languageRepo: languageRepo,
}
}
func (uc *LanguageUseCase) ReadLanguageById(ctx context.Context, id int32) (*models.Language, error) {
//userId := ctx.Value("user_id").(int32)
panic("access control is not implemented yet")
return uc.languageRepo.ReadLanguageById(ctx, id)
}