From 7d30331cdabdcea5c6d61f796d2eaee470b398cc Mon Sep 17 00:00:00 2001 From: "shimoda.m@nds-tyo.co.jp" Date: Fri, 18 Aug 2023 17:41:55 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E3=82=B3=E3=83=B3=E3=83=88=E3=83=AD?= =?UTF-8?q?=E3=83=BC=E3=83=A9=E3=83=BC=E9=96=A2=E6=95=B0=E3=82=92=E3=81=99?= =?UTF-8?q?=E3=81=B9=E3=81=A6async(=E3=82=B7=E3=83=B3=E3=82=B0=E3=83=AB?= =?UTF-8?q?=E3=82=B9=E3=83=AC=E3=83=83=E3=83=89)=E3=81=AB=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecs/jskult-webapp/src/controller/bio.py | 4 ++-- ecs/jskult-webapp/src/controller/healthcheck.py | 2 +- ecs/jskult-webapp/src/controller/login.py | 8 ++++---- ecs/jskult-webapp/src/controller/logout.py | 2 +- .../src/controller/master_mainte.py | 12 ++++++------ ecs/jskult-webapp/src/controller/menu.py | 2 +- ecs/jskult-webapp/src/controller/root.py | 2 +- ecs/jskult-webapp/src/controller/ultmarc.py | 16 ++++++++-------- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/ecs/jskult-webapp/src/controller/bio.py b/ecs/jskult-webapp/src/controller/bio.py index 108fc747..a11be3d0 100644 --- a/ecs/jskult-webapp/src/controller/bio.py +++ b/ecs/jskult-webapp/src/controller/bio.py @@ -25,7 +25,7 @@ logger = get_logger('生物由来参照') @router.get('/BioSearchList') -def bio_view( +async def bio_view( request: Request, batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService)), bio_service: BioViewService = Depends(get_service(BioViewService)) @@ -57,7 +57,7 @@ def bio_view( @router.post('/BioSearchList') -def search_bio( +async def search_bio( request: Request, bio_form: Optional[BioModel] = Depends(BioModel.as_form), bio_service: BioViewService = Depends(get_service(BioViewService)), diff --git a/ecs/jskult-webapp/src/controller/healthcheck.py b/ecs/jskult-webapp/src/controller/healthcheck.py index cdb8f00e..a9b819e7 100644 --- a/ecs/jskult-webapp/src/controller/healthcheck.py +++ b/ecs/jskult-webapp/src/controller/healthcheck.py @@ -8,5 +8,5 @@ router = APIRouter() @router.get('/') -def healthcheck(): +async def healthcheck(): return {'status': 'OK'} diff --git a/ecs/jskult-webapp/src/controller/login.py b/ecs/jskult-webapp/src/controller/login.py index c8a5663c..991457f8 100644 --- a/ecs/jskult-webapp/src/controller/login.py +++ b/ecs/jskult-webapp/src/controller/login.py @@ -30,7 +30,7 @@ logger = get_logger('ログイン') @router.get('/userlogin') -def login_user_redirect_view(): +async def login_user_redirect_view(): auth_query_string = parse.urlencode( { 'response_type': 'code', @@ -45,7 +45,7 @@ def login_user_redirect_view(): @router.get('/maintlogin') -def login_maintenance_view(request: Request): +async def login_maintenance_view(request: Request): mainte_login = MainteLoginViewModel() return templates.TemplateResponse( 'maintlogin.html', @@ -61,7 +61,7 @@ def login_maintenance_view(request: Request): @router.post('/maintlogin') -def login( +async def login( response: Response, request: LoginModel = Depends(LoginModel.as_form), login_service: LoginService = Depends(get_service(LoginService)) @@ -117,7 +117,7 @@ def login( @router.get('/authorize') -def sso_authorize( +async def sso_authorize( code: Union[str, None] = Depends(code_security), login_service: LoginService = Depends(get_service(LoginService)) ) -> Response: diff --git a/ecs/jskult-webapp/src/controller/logout.py b/ecs/jskult-webapp/src/controller/logout.py index 36ab6229..2d8c60c8 100644 --- a/ecs/jskult-webapp/src/controller/logout.py +++ b/ecs/jskult-webapp/src/controller/logout.py @@ -17,7 +17,7 @@ router = APIRouter() @router.get('/', response_class=HTMLResponse) -def logout_view( +async def logout_view( request: Request, reason: Optional[str] = None, session: Union[UserSession, None] = Depends(verify_session) diff --git a/ecs/jskult-webapp/src/controller/master_mainte.py b/ecs/jskult-webapp/src/controller/master_mainte.py index 460e256a..aa27ecb2 100644 --- a/ecs/jskult-webapp/src/controller/master_mainte.py +++ b/ecs/jskult-webapp/src/controller/master_mainte.py @@ -35,7 +35,7 @@ router.route_class = AuthenticatedRoute @router.get('/masterMainteMenu', response_class=HTMLResponse) -def menu_view( +async def menu_view( request: Request, batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService)) ): @@ -75,7 +75,7 @@ def menu_view( @router.get('/instEmpCsvUL', response_class=HTMLResponse) -def inst_emp_csv_upload_view( +async def inst_emp_csv_upload_view( request: Request, batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService)) ): @@ -177,7 +177,7 @@ async def inst_emp_csv_upload( @router.post('/newInst', response_class=HTMLResponse) -def new_inst_result_view( +async def new_inst_result_view( request: Request, csv_upload_form: Optional[MasterMainteCsvUpModel] = Depends(MasterMainteCsvUpModel.as_form), master_mainte_service: MasterMainteService = Depends(get_service(MasterMainteService)), @@ -219,7 +219,7 @@ def new_inst_result_view( @ router.get('/instEmpCsvDL', response_class=HTMLResponse) -def inst_emp_csv_download_view( +async def inst_emp_csv_download_view( request: Request, batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService)) ): @@ -331,7 +331,7 @@ async def inst_emp_csv_download( @router.get('/tableOverride', response_class=HTMLResponse) -def table_override_view( +async def table_override_view( request: Request, batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService)) ): @@ -371,7 +371,7 @@ def table_override_view( @router.post('/tableOverride', response_class=HTMLResponse) -def table_override_result_view( +async def table_override_result_view( request: Request, master_mainte_service: MasterMainteService = Depends(get_service(MasterMainteService)), batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService)) diff --git a/ecs/jskult-webapp/src/controller/menu.py b/ecs/jskult-webapp/src/controller/menu.py index 96826fce..0f801a9e 100644 --- a/ecs/jskult-webapp/src/controller/menu.py +++ b/ecs/jskult-webapp/src/controller/menu.py @@ -22,7 +22,7 @@ router.route_class = AuthenticatedRoute @router.get('/', response_class=HTMLResponse) -def menu_view( +async def menu_view( request: Request, batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService)) ): diff --git a/ecs/jskult-webapp/src/controller/root.py b/ecs/jskult-webapp/src/controller/root.py index c02471ca..3c47aa7a 100644 --- a/ecs/jskult-webapp/src/controller/root.py +++ b/ecs/jskult-webapp/src/controller/root.py @@ -6,6 +6,6 @@ router = APIRouter() @router.get('/') -def redirect_to_user_login(): +async def redirect_to_user_login(): # ルートパスへのアクセスは、顧客ユーザーログイン画面にリダイレクトさせる return RedirectResponse(url='/login/userlogin', status_code=status.HTTP_303_SEE_OTHER) diff --git a/ecs/jskult-webapp/src/controller/ultmarc.py b/ecs/jskult-webapp/src/controller/ultmarc.py index 825c8b50..a0161b0a 100644 --- a/ecs/jskult-webapp/src/controller/ultmarc.py +++ b/ecs/jskult-webapp/src/controller/ultmarc.py @@ -27,7 +27,7 @@ router.route_class = AuthenticatedRoute @router.get('/instSearch') -def ultmarc_inst_view( +async def ultmarc_inst_view( request: Request, batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService)), ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService)) @@ -59,7 +59,7 @@ def ultmarc_inst_view( @router.post('/instSearch') -def search_inst( +async def search_inst( request: Request, ultmarc_inst_form: Optional[UltmarcInstSearchModel] = Depends(UltmarcInstSearchModel.as_form), ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService)), @@ -103,7 +103,7 @@ def search_inst( @router.get('/instInfo') -def ultmarc_inst_info_view( +async def ultmarc_inst_info_view( request: Request, id: str, batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService)), @@ -143,7 +143,7 @@ def ultmarc_inst_info_view( @router.post('/instInfo') -def ultmarc_inst_info_search( +async def ultmarc_inst_info_search( request: Request, ultmarc_inst_form: Optional[UltmarcInstInfoModel] = Depends(UltmarcInstInfoModel.as_form), ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService)), @@ -190,7 +190,7 @@ def ultmarc_inst_info_search( @router.get('/docSearch') -def ultmarc_doctor_view( +async def ultmarc_doctor_view( request: Request, batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService)), ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService)) @@ -222,7 +222,7 @@ def ultmarc_doctor_view( @router.post('/docSearch') -def search_doc( +async def search_doc( request: Request, ultmarc_doctor_form: Optional[UltmarcDoctorSearchModel] = Depends(UltmarcDoctorSearchModel.as_form), ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService)), @@ -266,7 +266,7 @@ def search_doc( @router.get('/docInfo') -def ultmarc_doctor_info_view( +async def ultmarc_doctor_info_view( request: Request, id: str, batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService)), @@ -306,7 +306,7 @@ def ultmarc_doctor_info_view( @router.post('/docInfo') -def ultmarc_doctor_info_search( +async def ultmarc_doctor_info_search( request: Request, ultmarc_doctor_form: Optional[UltmarcDoctorInfoModel] = Depends(UltmarcDoctorInfoModel.as_form), ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService)),