Skip to content

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.

отлично что добавил эту проверку

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