Skip to content

Make patch route #10#60

Merged
Temmmmmo merged 26 commits intomainfrom
develop_patch
Mar 7, 2025
Merged

Make patch route #10#60
Temmmmmo merged 26 commits intomainfrom
develop_patch

Conversation

@DR0P-database
Copy link
Contributor

Изменения #10

ВАЖНО: изменена ручка для patch/review комментария админами

Чтобы изменить комментарий ему нужно отправить все поля для схемы CommentPost, их можно предварительно получить из GET, и в комментарии перепишутся поля. Также можно сделать комментарий анонимным через PATCH.

Детали реализации

Check-List

  • Вы проверили свой код перед отправкой запроса?
  • Вы написали тесты к реализованным функциям?
  • Вы не забыли применить форматирование black и isort для Back-End или Prettier для Front-End?

- Add test to patch user comments routes
- Add fixture for this tests
- Add enable set anonym to patch comment
@github-actions
Copy link

💩 Code linting failed, use black and isort to fix it.

@github-actions
Copy link

github-actions bot commented Nov 23, 2024

Code Coverage

Coverage Report
FileStmtsMissCoverMissing
rating_api
   __main__.py440%1–7
   exceptions.py43784%35–37, 48–50, 58
rating_api/models
   base.py55591%24–27, 76
   db.py85396%61, 75, 84
rating_api/routes
   base.py26485%48–50, 52
   comment.py1202381%43, 47, 65, 83, 124–126, 147–156, 199, 209–214, 221, 245, 256, 297
   exc_handlers.py32391%36, 43, 50
   lecturer.py891682%136, 141–167, 183, 191, 209, 215
rating_api/schemas
   base.py12467%6–9
rating_api/utils
   logging_utils.py432542%21–42, 51, 58–64, 70–83
TOTAL6409485% 

Summary

Tests Skipped Failures Errors Time
51 0 💤 0 ❌ 0 🔥 11.100s ⏱️

Copy link
Member

@Temmmmmo Temmmmmo left a comment

Choose a reason for hiding this comment

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

Сделай тогда новую модельку и поправь тесты и код

- Fix up tests
- Make allow unnecessary attibutes to patch
- Add new scheme to CommentUpdate
- Validation if given attribute is still not changed
- Validation if no attributes given
- Add tests
@github-actions
Copy link

github-actions bot commented Dec 6, 2024

💩 Code linting failed, use black and isort to fix it.

@github-actions
Copy link

github-actions bot commented Feb 7, 2025

💩 Code linting failed, use black and isort to fix it.

DROPDATABASE added 2 commits February 8, 2025 00:45
- tests
- pathc in not provide any parametr
@Zimovchik Zimovchik requested a review from Temmmmmo February 16, 2025 15:15
@github-actions
Copy link

github-actions bot commented Mar 1, 2025

💩 Code linting failed, use black and isort to fix it.

1 similar comment
@github-actions
Copy link

github-actions bot commented Mar 1, 2025

💩 Code linting failed, use black and isort to fix it.

@github-actions
Copy link

github-actions bot commented Mar 1, 2025

💩 Code linting failed, use black and isort to fix it.

@Temmmmmo Temmmmmo merged commit 0df91a1 into main Mar 7, 2025
2 checks passed
@Temmmmmo Temmmmmo linked an issue Mar 11, 2025 that may be closed by this pull request
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.

Ручка PATCH для неанонимных комментариев

5 participants