Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

kotanya13
Copy link

No description provided.

Copy link

@dirtymew dirtymew left a 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)
}

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)

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)

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 {

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"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

бинарник __debug_bin2354163408.exe - стоит удалить из ветки

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants