Skip to content
Merged

Dev #143

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 22

- name: Install Dependencies
run: npm install simple-git semver @actions/github @actions/core dotenv
Expand Down
12 changes: 6 additions & 6 deletions components.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
"tsx": true,
"tailwind": {
"config": "tailwind.config.ts",
"css": "app/globals.css",
"css": "src/app/globals.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/app/components",
"utils": "@/lib/utils",
"ui": "@/app/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
"components": "@/src/app/components",
"utils": "@/src/lib/utils",
"ui": "@/src/app/components/ui",
"lib": "@/src/lib",
"hooks": "@/src/hooks"
},
"iconLibrary": "lucide"
}
189 changes: 184 additions & 5 deletions docs/api_docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ API 서버 로그를 조회합니다.

---

### GET /admin/item/items/group/:group
#### GET /admin/item/items/group/:group

특정 그룹의 아이템 목록을 조회합니다.

Expand Down Expand Up @@ -212,7 +212,7 @@ API 서버 로그를 조회합니다.

---

### GET /admin/item/items/name/:name
#### GET /admin/item/items/name/:name

특정 이름을 포함하는 아이템 목록을 조회합니다.

Expand Down Expand Up @@ -249,7 +249,7 @@ API 서버 로그를 조회합니다.

---

### POST /admin/item
#### POST /admin/item

아이템을 추가합니다.

Expand Down Expand Up @@ -288,7 +288,7 @@ Response (201)

---

### PUT /admin/item/:id
#### PUT /admin/item/:id

아이템 정보를 수정합니다.

Expand Down Expand Up @@ -330,7 +330,7 @@ Response (201)

---

### DELETE /admin/item/:id
#### DELETE /admin/item/:id

아이템을 삭제합니다.

Expand All @@ -343,6 +343,167 @@ Response (201)
**Response (204)**
No Content - 성공적으로 삭제됨

---
### User (Admin)

#### GET /admin/user/users
등록된 사용자 목록을 조회합니다.

**Query Parameters**
| Name | Type | Description |
| ----- | ------ | ---------------- |
| page | number | 페이지 번호 |

**Response**

```ts
{
items: {
id: string;
nickname: string;
exp: number;
observedAt: string; // ISO format
exordial: string;
level: number;
isPublic: boolean;
isLastOnlineHidden: boolean;
}[];
totalCount: number;
currentPage: number;
totalPages: number;
}
```

---

#### GET /admin/user/users/id/:id
특정 사용자 정보를 조회합니다.

**Path Parameter**
| Name | Type | Description |
| ---- | ------ | ----------- |
| id | string | 사용자 ID |

**Response (200)**

```ts
{
items: {
id: string;
nickname: string;
exp: number;
observedAt: string; // ISO format
exordial: string;
level: number;
isPublic: boolean;
isLastOnlineHidden: boolean;
}[];
totalCount: 1 | 0; // 1 if user exists, otherwise 0
currentPage: 1;
totalPages: 1;
}
```


#### GET /admin/user/users/nickname/:nickname
특정 닉네임을 포함하는 사용자 정보를 조회합니다.

**Path Parameter**
| Name | Type | Description |
| ----- | ------ | ------------- |
| nickname | string | 사용자 닉네임 |

**Response (200)**

```ts
{
items: {
id: string;
nickname: string;
exp: number;
observedAt: string; // ISO format
exordial: string;
level: number;
isPublic: boolean;
isLastOnlineHidden: boolean;
}[];
totalCount: number; // 닉네임을 포함하는 사용자 수
currentPage: number;
totalPages: number;
}
```

---
#### PUT /admin/user/public-status/:id
특정 사용자의 공개 상태를 수정합니다.

**Path Parameter**
| Name | Type | Description |
| ---- | ------ | ----------- |
| id | string | 사용자 ID |

**Request Body**
| Field | Type | Description |
| ------------ | ------ | --------------- |
| isPublic | boolean| 공개 여부 |

```ts
{
isPublic: boolean;
}
```

**Response (200)**

```ts
{
id: string;
nickname: string;
exp: number;
observedAt: string; // ISO format
exordial: string;
level: number;
isPublic: boolean;
isLastOnlineHidden: boolean;
}
```

---

#### PUT /admin/user/last-online-hidden/:id

특정 사용자의 마지막 온라인 숨김 상태를 수정합니다.

**Path Parameter**
| Name | Type | Description |
| ---- | ------ | ----------- |
| id | string | 사용자 ID |

**Request Body**
| Field | Type | Description |
| ------------------ | ------ | --------------- |
| isLastOnlineHidden | boolean| 마지막 온라인 숨김 여부 |

```ts
{
isLastOnlineHidden: boolean;
}
```

**Response (200)**

```ts
{
id: string;
nickname: string;
exp: number;
observedAt: string; // ISO format
exordial: string;
level: number;
isPublic: boolean;
isLastOnlineHidden: boolean;
}
```

---

Expand Down Expand Up @@ -485,6 +646,24 @@ No Content - 성공적으로 삭제됨
}
```

---
### GET /profile/force-refresh/:userId
특정 유저의 프로필 정보를 강제 새로고침을 요청합니다.

**Path Parameter**
| Name | Type | Description |
| ------ | ------ | ----------- |
| userId | string | 사용자 ID |

**Response (200)**

```ts
{
message: "Profile refresh enqueued",
status: 200
}
```

---

## Item API
Expand Down
6 changes: 6 additions & 0 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ const nextConfig: NextConfig = {
port: '',
pathname: '/img/**',
},
{
protocol: 'https',
hostname: 'api.solidloop-studio.xyz',
port: '',
pathname: '/kkuko/**',
}
],
localPatterns: [
{
Expand Down
12 changes: 8 additions & 4 deletions scripts/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,15 @@ async function run() {

// 6. 체인지로그 내용 생성
const date = new Date().toISOString().split('T')[0];
let header = `# [${nextVersion}] - ${date}`;
const versionHeader = isReleaseMode ? `v${currentVersion}` : nextVersion;
let header = `# [${versionHeader}] - ${date}`;

// Repo URL이 있으면 비교 링크 생성
if (config.repoUrl) {
const prevVersionTag = `v${currentVersion}`;
header = `# [${nextVersion}](${config.repoUrl}/compare/${prevVersionTag}...${nextVersion}) - ${date}`;
// 릴리즈 모드일 때는 이전 태그와 현재 버전 비교 필요 (구현 생략 - 단순화)
// PR 모드일 때는 현재 버전(old) .. 다음 버전(new)
const prevVersionTag = isReleaseMode ? '...' : `v${currentVersion}`;
header = `# [${versionHeader}](${config.repoUrl}/compare/${prevVersionTag}...${versionHeader}) - ${date}`;
}

let changelogBody = `${header}\n\n`;
Expand Down Expand Up @@ -130,7 +133,8 @@ async function run() {
// --- 실행 분기: Release Mode (GitHub Release 등록) vs Normal Mode (PR 생성) ---

if (isReleaseMode) {
await createGitHubRelease(currentVersion, changelogBody, isDryRun);
// 릴리즈 모드에서는 이미 버전이 업데이트 된 상태이므로 currentVersion을 사용
await createGitHubRelease(`v${currentVersion}`, changelogBody, isReleaseMode && isDryRun);
return;
}

Expand Down
5 changes: 5 additions & 0 deletions src/app/admin/api-server/ApiServerMangerHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ export default function ApiServerAdminHome() {
title: 'Items 관리',
description: '아이템 상태 확인 및 수정',
href: '/admin/api-server/items',
},
{
title: 'Users 관리',
description: '사용자 목록 조회 및 상태 수정',
href: '/admin/api-server/users',
}
];

Expand Down
Loading
Loading