feat(DOC): 完整地审查了代码,更完整的注释说明
- 无代码修改
This commit is contained in:
@@ -20,7 +20,7 @@ export const chatApi = (client: ApiClient) => ({
|
||||
return client.post('/chat/sessions', data);
|
||||
},
|
||||
|
||||
// 更新聊天会话
|
||||
// 更新聊天会话(纯充数那个)
|
||||
updateSession: ({ sessionId, ...data }: UpdateChatSessionRequest): Promise<{ session: ChatSession }> => {
|
||||
return client.put(`/chat/sessions/${sessionId}`, data);
|
||||
},
|
||||
@@ -30,7 +30,7 @@ export const chatApi = (client: ApiClient) => ({
|
||||
return client.post(`/chat/sessions/${data.sessionId}/messages`, data);
|
||||
},
|
||||
|
||||
// 获取聊天会话列表
|
||||
// 获取聊天会话列表(不知道写了个什么玩意儿,转什么,应该不用参数的)
|
||||
getSessions: (params?: GetChatSessionsRequest): Promise<GetChatSessionsResponse> => {
|
||||
const config: AxiosRequestConfig = params ? { params } : {};
|
||||
return client.get('/chat/sessions', config);
|
||||
|
||||
@@ -4,7 +4,7 @@ import { userApi as createUserApi } from './user';
|
||||
import { chatApi as createChatApi } from './chat';
|
||||
import { modelApi as createModelApi } from './model';
|
||||
|
||||
// 导出工厂函数
|
||||
// 导出工厂函数(和实例同名导出是什么鬼啊),幸好不是从这里导出的
|
||||
export { postApi as createPostApi, userApi as createUserApi, chatApi as createChatApi, modelApi as createModelApi };
|
||||
|
||||
// 向后兼容的默认实例
|
||||
|
||||
@@ -4,8 +4,6 @@ import type {
|
||||
LoginResponse,
|
||||
RegisterRequest,
|
||||
RegisterResponse,
|
||||
RefreshTokenRequest,
|
||||
RefreshTokenResponse,
|
||||
UserProfileUpdateRequest,
|
||||
UserProfileUpdateResponse,
|
||||
UserFollowRequest,
|
||||
@@ -28,11 +26,6 @@ export const userApi = (client: ApiClient) => ({
|
||||
return client.post('/auth/register', data);
|
||||
},
|
||||
|
||||
// 刷新令牌
|
||||
refreshToken: (data: RefreshTokenRequest): Promise<RefreshTokenResponse> => {
|
||||
return client.post('/auth/refresh', data);
|
||||
},
|
||||
|
||||
// 获取用户档案
|
||||
getProfile: (): Promise<UserProfileUpdateResponse> => {
|
||||
return client.get('/user/profile');
|
||||
|
||||
Reference in New Issue
Block a user