eCourt-note/lib
Your Name 5121970f31
Some checks failed
Deploy eCourt Note Web to Server / Validate Database Schema (Drizzle) (push) Successful in 3s
Deploy eCourt Note Web to Server / Build Web Docker Image (push) Failing after 30s
Deploy eCourt Note Web to Server / Deploy eCourt Note Web to Server (push) Has been skipped
Deploy eCourt Note Web to Server / Notify Deployment Status (push) Failing after 1s
refactor(auth): consolidate auth under /api/auth/* endpoints
- ยุบ route auth ที่เคย copy กันจน drift (flow N11 หายจาก /api/auth/session)
  เหลือโค้ด inline สองเส้นเดียว: POST /api/auth/token (ทางเข้า 3: x-api-key
  docver / x-api-key purpose:"login" mint ลิงก์ note / ticket ของ add-in)
  + POST /api/auth/session (แลก credential + register N8 + N11 fid-only)
- POST /api/documents/token คงไว้เป็น alias re-export (กลุ่ม docver/e-Court
  เดิม — contract เดิมเป๊ะ, มี test toBe กัน copy แยกชุดกลับมา)
- ถอดเส้นฝั่ง note ทั้งสอบ: /api/note/auth/token + /api/note/auth/session
  (e-Court ต้องย้ายมาทางเข้ารวม — แจ้งทีม e-Court ก่อน deploy)
- utils/auth-store.ts: primitives กลางฝั่ง client (jwtExp/isExpired/
  localStorage store + memory fallback) — lib/note-session ใช้ร่วม
  (expMs decode จาก JWT payload = นาฬิกา server) และวางไว้ให้ wordaddin
  ย้ายมาใช้รอบหน้าได้ (รอบนี้ไม่แต้ wordaddin ตามข้อตกลง)
- นโยบาย token หมดอายุกลาง session: PDFViewer reportActionError จับ
  auth-error ของ Server Action ทุกจุด → ล้าง session แล้วพาไป
  /note?sso=expired (จบที่ gate เดียวกับ bootstrap 401)
- openapi: ทางเข้า purpose:"login" + schema LoginTokenRequest + ลบ path
  เส้นที่ถอด + test กันเส้นตายหลุดค้างใน spec
- เอกสาร sync: PLAN-SSO §0.6, CLAUDE.md, PLAN-STAGED, .env.example, /note/dev
- tests: ย้าย/เพิ่มชุด auth (50 เคสกลุ่ม auth ผ่าน, ทั้งชุด 444 ผ่าน) +
  e2e ครบทั้ง API (mint/alias/ticket/404 เส้นเก่า/N11/D4) และ browser

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-09 14:30:29 +07:00
..
addin-ticket.ts Refactor authentication flow and ticket handling in add-in 2026-11-04 21:18:19 +07:00
annotate-events.ts refactor(routes): move routes under /note, APIs under /api/note 2026-10-06 14:55:07 +07:00
document-versioning.ts feat: add GET /api/documents/latest returning latest version file with stamped ticket 2026-10-31 11:09:42 +07:00
docver-store.ts Refactor authentication flow and ticket handling in add-in 2026-11-04 21:18:19 +07:00
docver-token.ts Merge branch 'forgejo-dev' into working 2026-11-02 10:07:08 +07:00
docx-pool.ts Multi-thread support for applyTemplate 2026-11-03 14:48:37 +07:00
ecourt-fid.ts feat(n11): add base64 document staging from e-Court 2026-11-05 12:53:56 +07:00
external-api-auth.ts refactor(routes): move routes under /note, APIs under /api/note 2026-10-06 14:55:07 +07:00
external-api.ts feat(n11): add base64 document staging from e-Court 2026-11-05 12:53:56 +07:00
external-import.ts feat(n11): add base64 document staging from e-Court 2026-11-05 12:53:56 +07:00
lib-tmpl.ts Multi-thread support for applyTemplate 2026-11-03 14:48:37 +07:00
lib-utils.ts clear environment variable, update download-docx(sample) to check latest version before query database. 2026-11-02 10:00:12 +07:00
note-auth.ts refactor(auth): consolidate auth under /api/auth/* endpoints 2026-11-09 14:30:29 +07:00
note-session.ts refactor(auth): consolidate auth under /api/auth/* endpoints 2026-11-09 14:30:29 +07:00
note-token.ts refactor(auth): consolidate auth under /api/auth/* endpoints 2026-11-09 14:30:29 +07:00
openapi.ts refactor(auth): consolidate auth under /api/auth/* endpoints 2026-11-09 14:30:29 +07:00
pdf-actual-text.ts ซ่อม text ไทย PDF (ActualText) + revalidatePath ทุก action + คีย์ลัด DEL + ตรายาง label บรรทัดเดียว 2026-09-11 13:28:35 +07:00
remote-file.ts refactor(routes): move routes under /note, APIs under /api/note 2026-10-06 14:55:07 +07:00
server-pdf.ts feat(n11): add base64 document staging from e-Court 2026-11-05 12:53:56 +07:00
staged-docs.ts feat(n11): add base64 document staging from e-Court 2026-11-05 12:53:56 +07:00