🩹 backend,oo: small fixes, related to instance id (#525)

This commit is contained in:
Eric Doughty-Papassideris
2024-09-16 17:32:34 +02:00
parent ee63becdbb
commit b8814c0968
6 changed files with 63 additions and 9 deletions
@@ -3,6 +3,7 @@ import apiService from './api.service';
import logger from '../lib/logger';
import { Stream } from 'stream';
import FormData from 'form-data';
import { INSTANCE_ID } from '@/config';
/**
* Client for Twake Drive's APIs dealing with `DriveItem`s, using {@see apiService}
@@ -55,6 +56,7 @@ class DriveService implements IDriveService {
url: `/internal/services/documents/v1/companies/${company_id}/item/${drive_file_id}/editing_session`,
payload: {
editorApplicationId: 'tdrive_onlyoffice',
appInstanceId: INSTANCE_ID ?? '',
},
});
if (resource?.editingSessionKey) {
@@ -113,7 +115,7 @@ class DriveService implements IDriveService {
headers: form.getHeaders(),
});
} catch (error) {
logger.error('Failed to begin editing session: ', error.stack);
logger.error('Failed to end editing session: ', error.stack);
throw error;
//TODO make monitoring for such kind of errors
}