mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-09-28 06:06:38 +08:00
debug: use local accessCode
This commit is contained in:
parent
e5edfd97a5
commit
ec06309619
@ -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,9 +95,11 @@ 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);
|
||||||
if (!remoteState || remoteState === "") {
|
if (!remoteState || remoteState === "") {
|
||||||
|
Loading…
Reference in New Issue
Block a user