| | |
| | | current_user: UserModel = Depends(get_current_user), |
| | | db=Depends(get_db)): |
| | | if current and not pageSize: |
| | | return ResponseList(code=400, msg="缺少参数") |
| | | return Response(code=400, msg="缺少参数") |
| | | if status and status not in ["0", "1"]: |
| | | return Response(code=400, msg="Parameter status exception") |
| | | return Response(code=200, msg="", data=await get_dialog_list(db, current_user.id, keyword, label, status, pageSize, current)) |
| | | |
| | | |
| | |
| | | async def change_dialog_status(dialog: dialogDataUpdate, current_user: UserModel = Depends(get_current_user), db=Depends(get_db)): |
| | | if dialog.status not in ["0", "1"]: |
| | | return Response(code=400, msg="invalid parameter value", data={}) |
| | | is_create = await update_dialog_status_service(db, dialog.id, dialog.status) |
| | | is_create = await update_dialog_status_service(db, dialog.id, dialog.status, current_user.id) |
| | | if not is_create: |
| | | return Response(code=500, msg="dialog update failure", data={}) |
| | | return Response(code=200, msg="dialog update success", data={}) |