Compare commits

..

1 Commits

Author SHA1 Message Date
e221254c60 v0.1.25 - 빈 JSON 본문 요청 오류 수정 2026-04-22 11:20:22 +09:00
6 changed files with 22 additions and 18 deletions

View File

@@ -4,7 +4,7 @@
- 프로젝트명: 10 Minute Planner 웹 UI - 프로젝트명: 10 Minute Planner 웹 UI
- 기술 스택: Vue 3 + Vite + TailwindCSS + JavaScript - 기술 스택: Vue 3 + Vite + TailwindCSS + JavaScript
- 현재 기준 버전: `v0.1.24` 준비 중 - 현재 기준 버전: `v0.1.25` 준비 중
- Git 원격 저장소: `https://git.sori.studio/zenn/planner.sori.studio.git` - Git 원격 저장소: `https://git.sori.studio/zenn/planner.sori.studio.git`
## 기준 디자인 ## 기준 디자인
@@ -162,6 +162,7 @@
- 배포용 `docker-compose.yml`과 별도로 개발용 `docker-compose.dev.yml`을 추가했다. - 배포용 `docker-compose.yml`과 별도로 개발용 `docker-compose.dev.yml`을 추가했다.
- 개발용 compose는 프론트 `5173`, 백엔드 `3001`, PostgreSQL `5432`를 열고, 소스 마운트 + Vite HMR + Node watch 기반으로 자동 반영된다. - 개발용 compose는 프론트 `5173`, 백엔드 `3001`, PostgreSQL `5432`를 열고, 소스 마운트 + Vite HMR + Node watch 기반으로 자동 반영된다.
- 개발/배포 실행 방법은 루트 `README.md`에 먼저 적고, `HANDOFF.md`에는 변경 이유와 주의사항 위주로 남긴다. - 개발/배포 실행 방법은 루트 `README.md`에 먼저 적고, `HANDOFF.md`에는 변경 이유와 주의사항 위주로 남긴다.
- API 클라이언트는 body가 없는 `GET`, `DELETE` 요청에 `Content-Type: application/json`을 붙이지 않도록 수정했다. 날짜 선택 시 발생하던 `Body cannot be empty...` 오류는 이 문제였다.
- 비로그인 랜딩 카드는 상단 고정이 아니라 화면 중앙에 오도록 정렬을 수정했다. - 비로그인 랜딩 카드는 상단 고정이 아니라 화면 중앙에 오도록 정렬을 수정했다.
- 현재 환경에서는 Docker 데몬이 꺼져 있어서 `docker compose build` 실검증은 하지 못했고, 데몬 시작 후 다시 확인이 필요하다. - 현재 환경에서는 Docker 데몬이 꺼져 있어서 `docker compose build` 실검증은 하지 못했고, 데몬 시작 후 다시 확인이 필요하다.
- 이미지 저장 기능은 추후 `print-only` 또는 별도 export 전용 레이아웃을 기준으로 구현하면 화면/인쇄/공유 결과를 맞추기 쉽다. - 이미지 저장 기능은 추후 `print-only` 또는 별도 export 전용 레이아웃을 기준으로 구현하면 화면/인쇄/공유 결과를 맞추기 쉽다.

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "ten-minute-planner", "name": "ten-minute-planner",
"version": "0.1.24", "version": "0.1.25",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "ten-minute-planner", "name": "ten-minute-planner",
"version": "0.1.24", "version": "0.1.25",
"dependencies": { "dependencies": {
"vue": "^3.5.13" "vue": "^3.5.13"
}, },

View File

@@ -1,7 +1,7 @@
{ {
"name": "ten-minute-planner", "name": "ten-minute-planner",
"private": true, "private": true,
"version": "0.1.24", "version": "0.1.25",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@@ -1,19 +1,20 @@
const AUTH_STORAGE_KEY = 'ten-minute-planner-auth' const AUTH_STORAGE_KEY = 'ten-minute-planner-auth'
import { buildApiUrl, toUserFacingApiError } from './apiBase' import { buildApiUrl, toUserFacingApiError } from './apiBase'
function buildHeaders(token, extraHeaders = {}) { function buildHeaders(token, hasBody, extraHeaders = {}) {
return { return {
'Content-Type': 'application/json', ...(hasBody ? { 'Content-Type': 'application/json' } : {}),
...(token ? { Authorization: `Bearer ${token}` } : {}), ...(token ? { Authorization: `Bearer ${token}` } : {}),
...extraHeaders, ...extraHeaders,
} }
} }
async function request(path, { method = 'GET', token, body } = {}) { async function request(path, { method = 'GET', token, body } = {}) {
const hasBody = body !== undefined
const response = await fetch(buildApiUrl(path), { const response = await fetch(buildApiUrl(path), {
method, method,
headers: buildHeaders(token), headers: buildHeaders(token, hasBody),
body: body ? JSON.stringify(body) : undefined, body: hasBody ? JSON.stringify(body) : undefined,
}) })
const data = await response.json().catch(() => ({})) const data = await response.json().catch(() => ({}))

View File

@@ -1,17 +1,18 @@
import { buildApiUrl, toUserFacingApiError } from './apiBase' import { buildApiUrl, toUserFacingApiError } from './apiBase'
function buildHeaders(token) { function buildHeaders(token, hasBody) {
return { return {
'Content-Type': 'application/json', ...(hasBody ? { 'Content-Type': 'application/json' } : {}),
Authorization: `Bearer ${token}`, ...(token ? { Authorization: `Bearer ${token}` } : {}),
} }
} }
async function request(path, { method = 'GET', token, body } = {}) { async function request(path, { method = 'GET', token, body } = {}) {
const hasBody = body !== undefined
const response = await fetch(buildApiUrl(path), { const response = await fetch(buildApiUrl(path), {
method, method,
headers: buildHeaders(token), headers: buildHeaders(token, hasBody),
body: body ? JSON.stringify(body) : undefined, body: hasBody ? JSON.stringify(body) : undefined,
}) })
const data = await response.json().catch(() => ({})) const data = await response.json().catch(() => ({}))

View File

@@ -1,17 +1,18 @@
import { buildApiUrl, toUserFacingApiError } from './apiBase' import { buildApiUrl, toUserFacingApiError } from './apiBase'
function buildHeaders(token) { function buildHeaders(token, hasBody) {
return { return {
'Content-Type': 'application/json', ...(hasBody ? { 'Content-Type': 'application/json' } : {}),
Authorization: `Bearer ${token}`, ...(token ? { Authorization: `Bearer ${token}` } : {}),
} }
} }
async function request(path, { method = 'GET', token, body } = {}) { async function request(path, { method = 'GET', token, body } = {}) {
const hasBody = body !== undefined
const response = await fetch(buildApiUrl(path), { const response = await fetch(buildApiUrl(path), {
method, method,
headers: buildHeaders(token), headers: buildHeaders(token, hasBody),
body: body ? JSON.stringify(body) : undefined, body: hasBody ? JSON.stringify(body) : undefined,
}) })
const data = await response.json().catch(() => ({})) const data = await response.json().catch(() => ({}))