Skip to content

Commit 5548bef

Browse files
committed
docs: update /api/welcome to /api/session in README
Replace the obsolete welcome endpoint documentation with the session endpoint which is the critical one for frontend authentication.
1 parent 1e1687f commit 5548bef

3 files changed

Lines changed: 15 additions & 7 deletions

File tree

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,24 @@ AI chat backend with knowledge base Q&A, MCP tools, and OAuth authentication.
3737

3838
## APIs
3939

40-
### Get welcome message and new conversation ID
40+
### Get session information
4141

4242
<details>
43-
<summary><code>GET</code> <code><b>/api/welcome</b></code></summary>
43+
<summary><code>GET</code> <code><b>/api/session</b></code></summary>
4444

4545
##### Parameters
4646

4747
> None
4848
49+
##### Description
50+
51+
> Returns current login status and user info. If not logged in and `auth` is true, redirect to the URI in `data.uri` for OAuth login.
52+
4953
##### Responses
5054

5155
> | http code | content-type | response |
5256
> |---------------|-----------------------------------|---------------------------------------------------------------------|
53-
> | `200` | `application/json` | `{"message": "welcome message", "id": "new-cid"}` |
57+
> | `200` | `application/json` | `{"status":"Success","data":{"auth":false,"user":{...}}}` |
5458
5559

5660
</details>

README_CN.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,24 @@ AI 聊天后端,集知识库问答、MCP 工具与 OAuth 认证于一体。
3737

3838
## API 接口
3939

40-
### 获取欢迎消息和新会话 ID
40+
### 获取会话信息
4141

4242
<details>
43-
<summary><code>GET</code> <code><b>/api/welcome</b></code></summary>
43+
<summary><code>GET</code> <code><b>/api/session</b></code></summary>
4444

4545
##### 参数
4646

4747
>
4848
49+
##### 说明
50+
51+
> 返回当前登录状态和用户信息。若未登录且 `auth` 为 true,前端应跳转到 `data.uri` 进行 OAuth 登录。
52+
4953
##### 响应
5054

5155
> | http 状态码 | content-type | 响应 |
5256
> |---------------|-----------------------------------|---------------------------------------------------------------------|
53-
> | `200` | `application/json` | `{"message": "welcome message", "id": "new-cid"}` |
57+
> | `200` | `application/json` | `{"status":"Success","data":{"auth":false,"user":{...}}}` |
5458
5559

5660
</details>

data/preset.example.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ tools:
2828
channels:
2929
# WeCom WebSocket 长连接模式
3030
wecom:
31-
enable: true
31+
enable: false
3232
mode: websocket
3333
config:
3434
bot_id: "YOUR_BOT_ID"

0 commit comments

Comments
 (0)