Editing post in neuroapi

This commit is contained in:
2023-11-22 20:56:50 +03:00
parent 21752cd544
commit abf365f2f9

View File

@@ -48,3 +48,10 @@ class Post(ApiMethod):
if 'statusCode' in data:
raise Exception(data['message'])
return data
async def edit_text(self, post_id: str, text: str):
response = requests.post(self.api_url+f"/post/edit/{post_id}", data={"text": text})
data = response.json()
if 'statusCode' in data:
raise Exception(data['message'])
return data