feat: URLパス一覧の表記に合わせた。
This commit is contained in:
parent
8c09cb27e8
commit
d586bf68ef
@ -21,7 +21,7 @@ router.route_class = AuthenticatedRoute
|
||||
#########################
|
||||
# Views #
|
||||
#########################
|
||||
@router.get('/bio/BioSearchList')
|
||||
@router.get('/BioSearchList')
|
||||
def bio_view(
|
||||
request: Request,
|
||||
batch_status_service:BatchStatusService=Depends(get_service(BatchStatusService)),
|
||||
@ -50,7 +50,7 @@ def bio_view(
|
||||
)
|
||||
return templates_response
|
||||
|
||||
@router.post('/bio/BioSearchList')
|
||||
@router.post('/BioSearchList')
|
||||
def search_bio(
|
||||
request: Request,
|
||||
bio_form: Optional[BioModel] = Depends(BioModel.as_form),
|
||||
|
||||
@ -23,7 +23,7 @@ router = APIRouter()
|
||||
#########################
|
||||
# APIs #
|
||||
#########################
|
||||
@router.post('/api/bio/download')
|
||||
@router.post('/download')
|
||||
async def download_bio_data(
|
||||
search_param: BioModel=Depends(BioModel.as_body),
|
||||
download_param: BioDownloadModel=Depends(BioDownloadModel.as_body),
|
||||
|
||||
@ -5,6 +5,6 @@ router = APIRouter()
|
||||
#########################
|
||||
# Views #
|
||||
#########################
|
||||
@router.get('/healthcheck')
|
||||
@router.get('/')
|
||||
def healthcheck():
|
||||
return {'status': 'OK'}
|
||||
|
||||
@ -53,8 +53,8 @@ def login_maintenance_view(request: Request):
|
||||
#########################
|
||||
# APIs #
|
||||
#########################
|
||||
@router.post('/login')
|
||||
def sso_authorize(
|
||||
@router.post('/maintlogin')
|
||||
def login(
|
||||
response: Response,
|
||||
request: LoginModel = Depends(LoginModel.as_form),
|
||||
login_service: LoginService = Depends(get_service(LoginService))
|
||||
|
||||
@ -14,16 +14,16 @@ router = APIRouter()
|
||||
#########################
|
||||
# Views #
|
||||
#########################
|
||||
@router.get('/logout', response_class=HTMLResponse)
|
||||
@router.get('/', response_class=HTMLResponse)
|
||||
def logout_view(
|
||||
request: Request,
|
||||
reason: Optional[str] = None,
|
||||
session: Union[UserSession, None]=Depends(verify_session)
|
||||
):
|
||||
redirect_to = '/userlogin'
|
||||
redirect_to = '/login/userlogin'
|
||||
link_text = 'MeDaCA機能メニューへ'
|
||||
if session is not None and session.user_flg == '1':
|
||||
redirect_to = '/maintlogin'
|
||||
redirect_to = '/login/maintlogin'
|
||||
link_text = 'Login画面に戻る'
|
||||
logout = LogoutViewModel()
|
||||
logout.redirect_to = redirect_to
|
||||
|
||||
@ -16,7 +16,7 @@ router.route_class = AuthenticatedRoute
|
||||
#########################
|
||||
# Views #
|
||||
#########################
|
||||
@router.get('/menu', response_class=HTMLResponse)
|
||||
@router.get('/', response_class=HTMLResponse)
|
||||
def menu_view(
|
||||
request: Request,
|
||||
batch_status_service:BatchStatusService=Depends(get_service(BatchStatusService))
|
||||
|
||||
@ -15,18 +15,18 @@ app = FastAPI()
|
||||
# 静的ファイルをマウント
|
||||
app.mount('/static', StaticFiles(directory=path.dirname(static.__file__)), name='static')
|
||||
# ログイン関連のルーター
|
||||
app.include_router(login.router)
|
||||
app.include_router(login.router, prefix='/login')
|
||||
# ログアウト関連のルーター
|
||||
app.include_router(logout.router)
|
||||
app.include_router(logout.router, prefix='/logout')
|
||||
# メニュー画面関連のルーター
|
||||
app.include_router(menu.router)
|
||||
app.include_router(menu.router, prefix='/menu')
|
||||
# 生物由来関連のルーター
|
||||
app.include_router(bio.router)
|
||||
app.include_router(bio.router, prefix='/bio')
|
||||
# 生物由来のダウンロード用APIルーター。
|
||||
# クライアントから非同期呼出しされるため、共通ルーターとは異なる扱いとする。
|
||||
app.include_router(bio_download.router)
|
||||
app.include_router(bio_download.router, prefix='/bio')
|
||||
# ヘルスチェック用のルーター
|
||||
app.include_router(healthcheck.router)
|
||||
app.include_router(healthcheck.router, prefix='/healthcheck')
|
||||
|
||||
# エラー発生時にログアウト画面に遷移させるハンドラー
|
||||
app.add_exception_handler(status.HTTP_401_UNAUTHORIZED, http_exception_handler)
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
from typing import Optional
|
||||
|
||||
from src.model.db.base_db_model import BaseDBModel
|
||||
|
||||
|
||||
class PharmacyProductMasterModel(BaseDBModel):
|
||||
mkr_cd_nm: str
|
||||
mkr_cd_nm: Optional[str]
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
from typing import Optional
|
||||
|
||||
from src.model.db.base_db_model import BaseDBModel
|
||||
|
||||
|
||||
class WholesalerMasterModel(BaseDBModel):
|
||||
rec_whs_cd: str
|
||||
rec_whs_sub_cd: str
|
||||
nm: str
|
||||
whs_nm: str
|
||||
rec_whs_cd: Optional[str]
|
||||
rec_whs_sub_cd: Optional[str]
|
||||
nm: Optional[str]
|
||||
whs_nm: Optional[str]
|
||||
|
||||
@ -211,7 +211,7 @@
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/api/bio/download",
|
||||
url: "/bio/download",
|
||||
contentType: 'application/json',
|
||||
data: JSON.stringify(downloadRequestParams),
|
||||
scriptCharset: 'utf-8',
|
||||
|
||||
@ -13,13 +13,11 @@
|
||||
Mainte Login
|
||||
</h1>
|
||||
<br><br>
|
||||
<form name="login" class="text-center" method="post" action="/login">
|
||||
<form name="login" class="text-center" method="post" action="/login/maintlogin">
|
||||
<div class="form-group">
|
||||
<input type="text" name="ctrl_username" maxlength='10' style="ime-mode:disabled;" placeholder="UserID" class="form_login" onchange="formBtDisabled('login_button', 'login', true)">
|
||||
<input type="password" name="ctrl_password" style="ime-mode:disabled;" placeholder="Password" class="form_login" onchange="formBtDisabled('login_button', 'login', true)" onkeyup="formBtDisabled('login_button', 'login', true)" oninput="checkPassForm(this)">
|
||||
</div>
|
||||
<!-- ログイン判断のみなので、いらない -->
|
||||
<input type="hidden" name="scrId" value="maint">
|
||||
<input type="submit" id="login_button" name="login" class="btn btn-info btn-lg btn_width" id="submit" value="Login">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user