restore и like постов

This commit is contained in:
Rationess
2026-02-04 11:15:19 +03:00
parent ba78457de5
commit eb83c724cc
7 changed files with 76 additions and 7 deletions

View File

@@ -46,5 +46,11 @@ def view_post(token: str, id: UUID):
def get_liked_posts(token: str, username: str, limit: int = 20, cursor: int = 0):
return fetch(token, 'get', f'posts/user/{username}/liked', {'limit': limit, 'cursor': cursor})
# todo post restore
# todo post like
def restore_post(token: str, post_id: UUID):
return fetch(token, "post", f"posts/{post_id}/restore",)
def like_post(token: str, post_id: UUID):
return fetch(token, "post", f"posts/{post_id}/like")
def delete_like_post(token: str, post_id: UUID):
return fetch(token, "delete", f"posts/{post_id}/like")