mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-16 05:53:42 +08:00
debug: use local accessCode
This commit is contained in:
@@ -14,7 +14,7 @@ import { showToast } from "../components/ui-lib";
|
|||||||
import Locale from "../locales";
|
import Locale from "../locales";
|
||||||
import { createSyncClient, ProviderType } from "../utils/cloud";
|
import { createSyncClient, ProviderType } from "../utils/cloud";
|
||||||
import { corsPath } from "../utils/cors";
|
import { corsPath } from "../utils/cors";
|
||||||
|
import { useAccessStore } from "../store";
|
||||||
export interface WebDavConfig {
|
export interface WebDavConfig {
|
||||||
server: string;
|
server: string;
|
||||||
username: string;
|
username: string;
|
||||||
@@ -95,8 +95,10 @@ export const useSyncStore = createPersistStore(
|
|||||||
const provider = get().provider;
|
const provider = get().provider;
|
||||||
const config = get()[provider];
|
const config = get()[provider];
|
||||||
const client = this.getClient();
|
const client = this.getClient();
|
||||||
|
const accessStore = useAccessStore();
|
||||||
|
|
||||||
|
|
||||||
|
localState["access-control"].accessCode = accessStore.accessCode
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const remoteState = await client.get(config.username);
|
const remoteState = await client.get(config.username);
|
||||||
|
|||||||
Reference in New Issue
Block a user