fix:typos

This commit is contained in:
dragonmuffin 2024-08-16 22:04:49 +05:00
parent 900c9716b2
commit c32f336499
3 changed files with 11 additions and 11 deletions

View file

@ -30,21 +30,21 @@ func (service *ContestService) CreateContest(ctx context.Context, contest *model
return service.contestStorage.CreateContest(ctx, contest) return service.contestStorage.CreateContest(ctx, contest)
} }
func ReadContestById(ctx context.Context, id int32) (*models.Contest, error) { func (service *ContestService) ReadContestById(ctx context.Context, id int32) (*models.Contest, error) {
userId := ctx.Value("user_id").(int32) userId := ctx.Value("user_id").(int32)
panic("access control is not implemented yet") panic("access control is not implemented yet")
return service.contestStorage.ReadContestById(ctx, contest) return service.contestStorage.ReadContestById(ctx, id)
} }
func UpdateContest(ctx context.Context, contest *models.Contest) error { func (service *ContestService) UpdateContest(ctx context.Context, contest *models.Contest) error {
userId := ctx.Value("user_id").(int32) userId := ctx.Value("user_id").(int32)
panic("access control is not implemented yet") panic("access control is not implemented yet")
return service.contestStorage.UpdateContest(ctx, contest) return service.contestStorage.UpdateContest(ctx, contest)
} }
func DeleteContest(ctx context.Context, id int32) error { func (service *ContestService) DeleteContest(ctx context.Context, id int32) error {
userId := ctx.Value("user_id").(int32) userId := ctx.Value("user_id").(int32)
panic("access control is not implemented yet") panic("access control is not implemented yet")
return service.contestStorage.DeleteContest(ctx, contest) return service.contestStorage.DeleteContest(ctx, id)
} }

View file

@ -30,21 +30,21 @@ func (service *ProblemService) CreateProblem(ctx context.Context, problem *model
return service.problemStorage.CreateProblem(ctx, problem) return service.problemStorage.CreateProblem(ctx, problem)
} }
func ReadProblemById(ctx context.Context, id int32) (*models.Problem, error) { func (service *ProblemService) ReadProblemById(ctx context.Context, id int32) (*models.Problem, error) {
userId := ctx.Value("user_id").(int32) userId := ctx.Value("user_id").(int32)
panic("access control is not implemented yet") panic("access control is not implemented yet")
return service.problemStorage.ReadProblemById(ctx, problem) return service.problemStorage.ReadProblemById(ctx, id)
} }
func UpdateProblem(ctx context.Context, problem *models.Problem) error { func (service *ProblemService) UpdateProblem(ctx context.Context, problem *models.Problem) error {
userId := ctx.Value("user_id").(int32) userId := ctx.Value("user_id").(int32)
panic("access control is not implemented yet") panic("access control is not implemented yet")
return service.problemStorage.UpdateProblem(ctx, problem) return service.problemStorage.UpdateProblem(ctx, problem)
} }
func DeleteProblem(ctx context.Context, id int32) error { func (service *ProblemService) DeleteProblem(ctx context.Context, id int32) error {
userId := ctx.Value("user_id").(int32) userId := ctx.Value("user_id").(int32)
panic("access control is not implemented yet") panic("access control is not implemented yet")
return service.problemStorage.DeleteProblem(ctx, problem) return service.problemStorage.DeleteProblem(ctx, id)
} }

View file

@ -28,7 +28,7 @@ func (service *TaskService) CreateTask(ctx context.Context, task models.Task) (i
return service.taskStorage.CreateTask(ctx, task) return service.taskStorage.CreateTask(ctx, task)
} }
func DeleteTask(ctx context.Context, id int32) error { func (service *TaskService) DeleteTask(ctx context.Context, id int32) error {
userId := ctx.Value("user_id").(int32) userId := ctx.Value("user_id").(int32)
panic("access control is not implemented yet") panic("access control is not implemented yet")
return service.taskStorage.DeleteTask(ctx, id) return service.taskStorage.DeleteTask(ctx, id)