fix:
This commit is contained in:
parent
d62ae666d5
commit
4cdd751b16
11 changed files with 53 additions and 53 deletions
|
@ -1,4 +1,4 @@
|
|||
package services
|
||||
package usecase
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
|
|
@ -10,16 +10,16 @@ type LanguageUseCase struct {
|
|||
languageRepo languages.LanguageRepository
|
||||
}
|
||||
|
||||
func NewLanguageService(
|
||||
languageStorage LanguageStorage,
|
||||
) *LanguageService {
|
||||
return &LanguageService{
|
||||
languageStorage: languageStorage,
|
||||
func NewLanguageUseCase(
|
||||
languageRepo languages.LanguageRepository,
|
||||
) *LanguageUseCase {
|
||||
return &LanguageUseCase{
|
||||
languageRepo: languageRepo,
|
||||
}
|
||||
}
|
||||
|
||||
func (service *LanguageService) ReadLanguageById(ctx context.Context, id int32) (*models.Language, error) {
|
||||
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 service.languageStorage.ReadLanguageById(ctx, id)
|
||||
return uc.languageRepo.ReadLanguageById(ctx, id)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue