mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-05 20:30:15 +01:00
Improve kernel API authentication (#9702)
* 🎨 Add API `/api/network/echo` * 🎨 Improve localhost checking * 🎨 Add `model.CheckReadonly` for some APIs /api/storage/setLocalStorage /api/storage/setLocalStorageVal /api/notebook/openNotebook /api/notebook/removeNotebook /api/search/removeTemplate /api/attr/setBlockAttrs /api/sync/importSyncProviderS3 /api/sync/importSyncProviderWebDAV /api/riff/resetRiffCards /api/snippet/setSnippet /api/av/setAttributeViewBlockAttr /api/archive/zip /api/archive/unzip * 🎨 Remove `model.CheckReadonly` for some APIs /api/history/searchHistory /api/history/getHistoryItems /api/search/findReplace /api/block/getParentNextChildID /api/file/readDir /api/sync/listCloudSyncDir /api/asset/getDocImageAssets /api/template/renderSprig /api/ai/chatGPT /api/ai/chatGPTWithAction * 🎨 improve API `/api/network/echo`
This commit is contained in:
parent
70b3406e03
commit
cb016aac14
5 changed files with 110 additions and 51 deletions
|
|
@ -263,11 +263,13 @@ export const getLocalStorage = (cb: () => void) => {
|
|||
});
|
||||
cb();
|
||||
|
||||
// 数据兼容,移除历史数据,3.8.4 移除
|
||||
fetchPost("/api/storage/removeLocalStorageVals", {
|
||||
app: Constants.SIYUAN_APPID,
|
||||
keys: ["leftColumn", "local-searchkey", "local-searchedata", "local-searchekeys", "local-searchetabdata", "rightColumn", "topBar"]
|
||||
});
|
||||
if (!window.siyuan.config.readonly) {
|
||||
// 数据兼容,移除历史数据,3.8.4 移除
|
||||
fetchPost("/api/storage/removeLocalStorageVals", {
|
||||
app: Constants.SIYUAN_APPID,
|
||||
keys: ["leftColumn", "local-searchkey", "local-searchedata", "local-searchekeys", "local-searchetabdata", "rightColumn", "topBar"]
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue