-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ï am too late (second try) #184
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Привет Сергей
PR все еще оформлен неверно - он в репозиторий задания а не твой форк
API верно описан - но есть что подправить
return | ||
} | ||
delete(tasks, id) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
тут нужно еще
добавить заголовок "Content-Type", "application/json"
и лучше явно вернуть код 200
precode.go
Outdated
id := chi.URLParam(r, "id") | ||
|
||
if _, ok := tasks[id]; !ok { | ||
http.Error(w, "Задача не найдена", http.StatusNotFound) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
неверный код ответа - см задание
precode.go
Outdated
id := chi.URLParam(r, "id") | ||
task, ok := tasks[id] | ||
if !ok { | ||
http.Error(w, "Задача не найдена", http.StatusNoContent) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
неверный код ответа - см задание
return | ||
} | ||
// прверка, существует ли задача с таким ID | ||
if _, ok := tasks[task.ID]; ok { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
отлично что добавил эту проверку
@@ -1,6 +1,7 @@ | |||
package main | |||
|
|||
import ( | |||
"encoding/json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
бинарник __debug_bin2354163408.exe - стоит удалить из ветки
No description provided.