fix: OnlyOffice edit session token expiration and add session expired modal
Some checks failed
Automated Container Build / build-and-push (push) Failing after 15s
Some checks failed
Automated Container Build / build-and-push (push) Failing after 15s
This commit is contained in:
parent
1f83d57942
commit
218fb40743
7 changed files with 130 additions and 16 deletions
|
|
@ -289,13 +289,13 @@ class ApiClient {
|
|||
}
|
||||
|
||||
async createDownloadToken(): Promise<string> {
|
||||
const res = await fetch(`${API_BASE}/api/auth/download-token`, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
Authorization: `Bearer ${this.accessToken}`,
|
||||
},
|
||||
});
|
||||
if (!res.ok) throw new Error('Failed to fetch download token');
|
||||
const res = await this.request('/api/auth/download-token');
|
||||
const data = await res.json();
|
||||
return data.token;
|
||||
}
|
||||
|
||||
async createEditToken(): Promise<string> {
|
||||
const res = await this.request('/api/auth/edit-token');
|
||||
const data = await res.json();
|
||||
return data.token;
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue