mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 10:12:51 +00:00
Merge branch 'main' of github.com:maxkb-dev/maxkb
This commit is contained in:
commit
ee310ef636
|
|
@ -152,12 +152,12 @@ const getDatasetHitTest: (
|
|||
* @param 参数 dataset_id
|
||||
* @query 参数 sync_type // 同步类型->replace:替换同步,complete:完整同步
|
||||
*/
|
||||
const getSyncWebDateset: (
|
||||
const putSyncWebDateset: (
|
||||
dataset_id: string,
|
||||
sync_type: string,
|
||||
loading?: Ref<boolean>
|
||||
) => Promise<Result<any>> = (dataset_id, sync_type, loading) => {
|
||||
return get(`${prefix}/${dataset_id}`, { sync_type }, loading)
|
||||
return put(`${prefix}/${dataset_id}/sync_web`, { sync_type }, loading)
|
||||
}
|
||||
|
||||
export default {
|
||||
|
|
@ -170,5 +170,5 @@ export default {
|
|||
listUsableApplication,
|
||||
getDatasetHitTest,
|
||||
postWebDateset,
|
||||
getSyncWebDateset
|
||||
putSyncWebDateset
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ const useDatasetStore = defineStore({
|
|||
async asyncSyncDateset(id: string, sync_type: string, loading?: Ref<boolean>) {
|
||||
return new Promise((resolve, reject) => {
|
||||
datasetApi
|
||||
.getSyncWebDateset(id, sync_type, loading)
|
||||
.putSyncWebDateset(id, sync_type, loading)
|
||||
.then((data) => {
|
||||
resolve(data)
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue