изменил метод taskUpdate в persistance
This commit is contained in:
parent
a04fc956bd
commit
2307bc3784
@ -26,11 +26,23 @@ func (tm *TaskManagerRepository) AddTask(task tasks.Task) error {
|
||||
|
||||
func (tm *TaskManagerRepository) UpdateTask(task tasks.Task) error {
|
||||
_, err := tm.db.Exec(`UPDATE task_manager.tasks
|
||||
SET name=$1,
|
||||
description=$2,
|
||||
id_user=$3,
|
||||
status=$4
|
||||
WHERE id=$3`, task.Title, task.Description, task.IdUser, task.Status)
|
||||
SET
|
||||
id_sprint=$1,
|
||||
id_user=$2,
|
||||
id_project=$3,
|
||||
title=$4,
|
||||
description=$5,
|
||||
duration=$6,
|
||||
status=$7
|
||||
WHERE id=$8`,
|
||||
task.IdSprint,
|
||||
task.IdUser,
|
||||
task.IdProject,
|
||||
task.Title,
|
||||
task.Description,
|
||||
task.Duration,
|
||||
task.DateStart,
|
||||
task.Id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user