From 0de33f04bcefa895614b589f244068d854b65ef1 Mon Sep 17 00:00:00 2001 From: "maxiaozhe@alicorns.co.jp" Date: Thu, 25 Apr 2024 09:46:34 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=A2=E3=83=97=E3=83=AA=E3=81=8B=E3=82=89?= =?UTF-8?q?=E3=83=95=E3=82=A3=E3=83=BC=E3=83=AB=E3=83=89=E9=81=B8=E6=8A=9E?= =?UTF-8?q?UI=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/core/security.py | 4 +- frontend/src/components/AppSelect.vue | 12 +- frontend/src/components/FieldSelect.vue | 26 ++-- frontend/src/components/left/AppSelector.vue | 2 +- .../src/components/right/AppFieldSelect.vue | 138 ++++++++++-------- frontend/src/components/right/FieldInput.vue | 17 +-- 6 files changed, 106 insertions(+), 93 deletions(-) diff --git a/backend/app/core/security.py b/backend/app/core/security.py index 098fe34..6465002 100644 --- a/backend/app/core/security.py +++ b/backend/app/core/security.py @@ -9,7 +9,7 @@ pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto") SECRET_KEY = "alicorns" ALGORITHM = "HS256" -ACCESS_TOKEN_EXPIRE_MINUTES = 30 +ACCESS_TOKEN_EXPIRE_MINUTES = 2880 def get_password_hash(password: str) -> str: @@ -25,7 +25,7 @@ def create_access_token(*, data: dict, expires_delta: timedelta = None): if expires_delta: expire = datetime.utcnow() + expires_delta else: - expire = datetime.utcnow() + timedelta(minutes=2880) + expire = datetime.utcnow() + timedelta(minutes=ACCESS_TOKEN_EXPIRE_MINUTES) to_encode.update({"exp": expire}) encoded_jwt = jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM) return encoded_jwt diff --git a/frontend/src/components/AppSelect.vue b/frontend/src/components/AppSelect.vue index 946558a..261a7e6 100644 --- a/frontend/src/components/AppSelect.vue +++ b/frontend/src/components/AppSelect.vue @@ -17,7 +17,7 @@ \ No newline at end of file + diff --git a/frontend/src/components/right/FieldInput.vue b/frontend/src/components/right/FieldInput.vue index 716310d..9be0622 100644 --- a/frontend/src/components/right/FieldInput.vue +++ b/frontend/src/components/right/FieldInput.vue @@ -12,16 +12,16 @@ - + - + - \ No newline at end of file