feat: 更新hook fetch 库
This commit is contained in:
@@ -9,19 +9,19 @@ import { del, get, post, put } from '@/utils/request';
|
||||
// 获取会话列表
|
||||
export function get_session_list(params: GetSessionListParams) {
|
||||
// return get<ChatSessionVo[]>('/system/session/list', params);
|
||||
return get<ChatSessionVo[]>('/session', params);
|
||||
return get<ChatSessionVo[]>('/session', params).json();
|
||||
}
|
||||
// 创建会话
|
||||
export function create_session(data: CreateSessionDTO) {
|
||||
return post('/session', data);
|
||||
return post('/session', data).json();
|
||||
}
|
||||
// 更新会话
|
||||
export function update_session(data: ChatSessionVo) {
|
||||
return put(`/session/${data.id}`, data);
|
||||
return put(`/session/${data.id}`, data).json();
|
||||
}
|
||||
// 会话详情
|
||||
export function get_session(id: string) {
|
||||
return get<ChatSessionVo>(`/session/${id}`);
|
||||
return get<ChatSessionVo>(`/session/${id}`).json();
|
||||
}
|
||||
// 删除会话
|
||||
export function delete_session(ids: string[]) {
|
||||
|
||||
@@ -91,7 +91,7 @@ export interface ChatSessionVo {
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime?: Date;
|
||||
creationTime?: Date;
|
||||
/**
|
||||
* 自定义的消息前缀图标字段
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user