mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 12:25:20 +00:00
chore: clean up unnecessary code
This commit is contained in:
parent
41ef596472
commit
84f5a52923
1 changed files with 5 additions and 12 deletions
|
|
@ -31,22 +31,15 @@ class OneDriveConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
private async getCredentials(): Promise<void> {
|
private async getCredentials(): Promise<void> {
|
||||||
let response;
|
|
||||||
const headers: HeadersInit = {
|
const headers: HeadersInit = {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
};
|
};
|
||||||
|
|
||||||
if(window.location.hostname === 'localhost') {
|
const response = await fetch('/api/config', {
|
||||||
response = await fetch('http://localhost:8080/api/config', {
|
headers,
|
||||||
headers,
|
credentials: 'include'
|
||||||
credentials: 'include'
|
});
|
||||||
});
|
|
||||||
} else {
|
|
||||||
response = await fetch('/api/config', {
|
|
||||||
headers,
|
|
||||||
credentials: 'include'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error('Failed to fetch OneDrive credentials');
|
throw new Error('Failed to fetch OneDrive credentials');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue