mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
This commit is contained in:
parent
a0900e5944
commit
400eaf714a
1 changed files with 2 additions and 2 deletions
|
|
@ -134,7 +134,7 @@ export const hotKey2Electron = (key: string) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const setLocalStorage = () => {
|
export const setLocalStorage = () => {
|
||||||
fetchPost("/api/system/getLocalStorage", undefined, (response) => {
|
fetchPost("/api/storage/getLocalStorage", undefined, (response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
Object.keys(response.data).forEach(item => {
|
Object.keys(response.data).forEach(item => {
|
||||||
window.localStorage.setItem(item, response.data[item]);
|
window.localStorage.setItem(item, response.data[item]);
|
||||||
|
|
@ -146,7 +146,7 @@ export const setLocalStorage = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const exportLocalStorage = (cb: () => void) => {
|
export const exportLocalStorage = (cb: () => void) => {
|
||||||
fetchPost("/api/system/setLocalStorage", {val: window.localStorage}, () => {
|
fetchPost("/api/storage/setLocalStorage", {val: window.localStorage}, () => {
|
||||||
cb();
|
cb();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue