fix: add task model to function definition

This commit is contained in:
dragonmuffin 2024-08-17 15:48:00 +05:00
parent d9e2f46de8
commit edf55aa4b7

View file

@ -1,25 +1,25 @@
package services
import (
"context"
"git.sch9.ru/new_gate/ms-tester/internal/models"
"context"
"git.sch9.ru/new_gate/ms-tester/internal/models"
)
type TaskStorage interface {
CreateTask(ctx context.Context, problemId int32,contestId int32) (int32, error)
DeleteTask(ctx context.Context, id int32) error
CreateTask(ctx context.Context, models.Task) (int32, error)
DeleteTask(ctx context.Context, id int32) error
}
type TaskService struct {
taskStorage TaskStorage
taskStorage TaskStorage
}
func NewTaskService(
taskStorage TaskStorage,
taskStorage TaskStorage,
) *TaskService {
return &TaskService{
taskStorage: taskStorage,
}
return &TaskService{
taskStorage: taskStorage,
}
}
func (service *TaskService) CreateTask(ctx context.Context, task models.Task) (int32, error) {