fix: add task model to function definition
This commit is contained in:
parent
d9e2f46de8
commit
edf55aa4b7
1 changed files with 9 additions and 9 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue