reqex fix

This commit is contained in:
Kseninia Mikhaylova 2024-05-28 10:34:32 +03:00
parent b0cd616020
commit 94798925b5
1 changed files with 1 additions and 3 deletions

View File

@ -7,8 +7,6 @@ from app.constants import *
app = FastAPI() app = FastAPI()
tg = {38: 198225670}
@app.get("/") @app.get("/")
def read_root(): def read_root():
@ -57,7 +55,7 @@ async def tg_intgr_get(request: Request):
) )
data = requests.get(get_comment_hook) data = requests.get(get_comment_hook)
data_json = data.json() data_json = data.json()
comment = re.sub(r"\\[USER=\d+\]|\[\/USER\]", "", data_json["result"]["POST_MESSAGE"]) comment = re.sub(r"\[USER=\d+\]|\[\/USER\]", "", data_json["result"]["POST_MESSAGE"])
comment += f'\nhttps://crm.svs-tech.pro/company/personal/user/{bx_id}/tasks/task/view/{task_id}/' comment += f'\nhttps://crm.svs-tech.pro/company/personal/user/{bx_id}/tasks/task/view/{task_id}/'
mentions = re.findall(rf"\[USER=({bx_id})\]", comment) mentions = re.findall(rf"\[USER=({bx_id})\]", comment)