This commit is contained in:
wangdan-fit2cloud 2024-01-16 17:22:51 +08:00
parent 91b613c4da
commit 00a877402a
2 changed files with 4 additions and 4 deletions

View File

@ -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
}

View File

@ -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)
})