당직근무 0.14.3 (웹 2026-11-25.3): 조사 오류 고침

- 업데이트 안내 "새로운 당직근무이" → "당직근무 새 버전이"(앞 커밋 be0e73d를 이번 APK에 넣음)
- 조사 자동 고르기(앱 Korean.kt · 서버 korean.py · 웹 korean.js): 근무·일정 겹침 안내, 교환 확인, 관리자·게시판 입력 오류 안내
- 게시판 관리 알림 "숨기기 했습니다" → "숨겼습니다" 등
- 앱 0.14.3 / 설치 번호 23. APK 870782바이트, SHA-256 c6f9e3045a3f0af1684ad748e5e5653732d12e9f3bfd8e1abfe3f2f236be7878
- 검사: 서버 104개(조사 1개 새로), 앱 단위 56개, 조사 JS 검사
This commit is contained in:
블리어 committed 2026-11-25 01:21:29 +00:00
1 parent be0e73d307
commit 6c77fc998c
24 files changed
+169 -38

No files matched your search

+7 -6
View File
@@ -16,6 +16,7 @@ from fastapi import HTTPException, Request
from fastapi.responses import FileResponse
from guide_text import GUIDE_FIELDS
from korean import josa
# 홈페이지에서 고칠 수 있는 항목. kind: text(한 줄), multiline(줄바꿈 허용), longtext(긴 안내 글), url, bool, choice, number, color
# page는 관리자 페이지의 어느 화면에 보일지다(site 홈페이지 · guide 연동 안내 · board 게시판). 없으면 site.
@@ -99,11 +100,11 @@ def check_value(key, value):
return value
if kind == "number":
if type(value) is not int or not field["min"] <= value <= field["max"]:
raise HTTPException(400, field["label"] + "은 " + str(field["min"]) + "부터 " + str(field["max"]) + "까지의 숫자로 정해 주세요.")
raise HTTPException(400, josa(field["label"], "은", "는") + " " + str(field["min"]) + "부터 " + str(field["max"]) + "까지의 숫자로 정해 주세요.")
return value
if kind == "color":
if not isinstance(value, str) or not re.fullmatch(r"#[0-9a-fA-F]{6}", value):
raise HTTPException(400, field["label"] + "은 #RRGGBB 형식으로 골라 주세요.")
raise HTTPException(400, josa(field["label"], "은", "는") + " #RRGGBB 형식으로 골라 주세요.")
return value.lower()
if not isinstance(value, str):
raise HTTPException(400, field["label"] + " 값을 확인해 주세요.")
@@ -111,15 +112,15 @@ def check_value(key, value):
if kind not in ("multiline", "longtext"):
value = " ".join(value.split())
elif value.count("\n") >= field.get("lines", 3):
raise HTTPException(400, field["label"] + "은 " + str(field.get("lines", 3)) + "줄까지 쓸 수 있습니다.")
raise HTTPException(400, josa(field["label"], "은", "는") + " " + str(field.get("lines", 3)) + "줄까지 쓸 수 있습니다.")
if len(value) > field["max"]:
raise HTTPException(400, field["label"] + "은 " + str(field["max"]) + "자까지 쓸 수 있습니다.")
raise HTTPException(400, josa(field["label"], "은", "는") + " " + str(field["max"]) + "자까지 쓸 수 있습니다.")
if any(ord(ch) < 32 and ch != "\n" for ch in value):
raise HTTPException(400, field["label"] + "에 쓸 수 없는 글자가 있습니다.")
if kind == "url" and not re.fullmatch(r"https://[A-Za-z0-9.-]+(/[^\s<>\"']*)?", value):
raise HTTPException(400, field["label"] + "는 https:// 로 시작하는 주소여야 합니다.")
raise HTTPException(400, josa(field["label"], "은", "는") + " https:// 로 시작하는 주소여야 합니다.")
if kind != "url" and key != "noticeText" and not field.get("empty") and not value:
raise HTTPException(400, field["label"] + "을 비워 둘 수 없습니다. 기본값으로 되돌리려면 기본값 버튼을 누르세요.")
raise HTTPException(400, josa(field["label"], "을", "를") + " 비워 둘 수 없습니다. 기본값으로 되돌리려면 기본값 버튼을 누르세요.")
return value