feat: - Update Install and Download docs call to handle tenant changes

This commit is contained in:
Vincent BRIDIER 2025-09-01 18:57:23 +02:00
parent 665cd3f3ea
commit b2cb5182bc
No known key found for this signature in database
GPG key ID: 8571BFA20420D512
4 changed files with 13 additions and 3 deletions

View file

@ -1,5 +1,11 @@
# CHANGELOG
## 3.1.1
### Évolution - 3.1.1
- Update Install and Download docs call to handle tenant changes
## 3.0.1
### Bug - 3.0.1

View file

@ -139,7 +139,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "3.0.1"
versionName "3.1.1"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
if (isNewArchitectureEnabled()) {

View file

@ -136,6 +136,7 @@ class InstallScreen extends React.Component {
let toDL = [];
if (response.data) {
if (response.data.status === 'OK') {
const rootUrl = url.substring(0, url.lastIndexOf('/'));
_.forEach(response.data.datas, function (value, key) {
switch (key) {
case 'MainColor':
@ -147,7 +148,7 @@ class InstallScreen extends React.Component {
case 'BackgroundImage':
case 'HomeButtonImage':
toDL.push({
source: url + '/' + value,
source: rootUrl + '/' + value,
dest: FileSystem.documentDirectory + key + '.png',
});
break;

View file

@ -407,7 +407,10 @@ class SyncScreen extends React.Component {
if (this.state.downloadingFile === false) {
this.setState({ downloadingFile: true });
}
const endpoint = SyncController.getUrlBo() + '/storage/docs/';
const tenantUrl = SyncController.getUrlBo();
const rootUrl = tenantUrl.substring(0, tenantUrl.lastIndexOf('/'));
const tenantId = tenantUrl.match(/[^\/]+$/)[0];
const endpoint = rootUrl + '/storage/docs/' + tenantId + "/";
const doc = documents[i];
this.setState({
txtStep: