|
{"file_name": "94977984-81b4-474d-8739-ae37897c0939.png", "code": "def create_like(session: Session, activity: CreateActivity) -> Like:\r\n with session() as db:\r\n like: Like = Like(\r\n author_id=activity.user_id,\r\n post_id=activity.post_id\r\n )\r\n db.add(like)\r\n db.commit()\r\n db.refresh(like)\r\n return like"} |
|
{"file_name": "66166aa0-8b0e-4ea6-b35c-942dd167fe09.png", "code": "def create_like(session: Session, activity: CreateActivity) -> Like:\r\n with session() as db:\r\n like: Like = Like(\r\n author_id=activity.user_id,\r\n post_id=activity.post_id\r\n )\r\n db.add(like)\r\n db.commit()\r\n db.refresh(like)\r\n return like"} |
|
{"file_name": "214cccaa-a48a-458c-9143-1808d6214029.png", "code": "def create_like(session: Session, activity: CreateActivity) -> Like:\r\n with session() as db:\r\n like: Like = Like(\r\n author_id=activity.user_id,\r\n post_id=activity.post_id\r\n )\r\n db.add(like)\r\n db.commit()\r\n db.refresh(like)\r\n return like"} |
|
{"file_name": "d895922a-a590-4ce0-9306-5bceaadcb047.png", "code": "def create_like(session: Session, activity: CreateActivity) -> Like:\r\n with session() as db:\r\n like: Like = Like(\r\n author_id=activity.user_id,\r\n post_id=activity.post_id\r\n )\r\n db.add(like)\r\n db.commit()\r\n db.refresh(like)\r\n return like"} |
|
{"file_name": "35862378-8b62-40c0-832c-3b91946265ab.png", "code": "def create_like(session: Session, activity: CreateActivity) -> Like:\r\n with session() as db:\r\n like: Like = Like(\r\n author_id=activity.user_id,\r\n post_id=activity.post_id\r\n )\r\n db.add(like)\r\n db.commit()\r\n db.refresh(like)\r\n return like"} |
|
|