Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

### Backend
#### New features
* **(main)** : Suppression du fichier client-infos.json pour la version minimum requise. Remplacé par des variables d'environnement
* **(cards)** : Suppression du microservice cards au profit de 2 microservices séparés **card** et **card-eu**
* **(card)** : Nouveau microservice de gestion de la carte dématérialisée de l'établissement
* **(card-eu)** : Nouveau microservice de gestion de la carte européenne étudiante
Expand Down
4 changes: 4 additions & 0 deletions dev/user-backend-nest/main/.env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ API_GATEWAY_SERVER_PORT=3000
API_GATEWAY_SERVER_HOST=127.0.0.1
API_GATEWAY_CORS_ORIGIN=http://localhost:8100,https://localhost,capacitor://localhost

APP_UPDATE_STORE_VERSION=1.0.0
APP_UPDATE_MIN_VERSION_REQUIRED=1.0.0
APP_UPDATE_PLAY_STORE_URL=https://play.google.com/store/apps/details?id=org.monUniversite.monApplication
APP_UPDATE_APP_STORE_URL=https://apps.apple.com/fr/app/monUniversite/idxxxxxxxxx

AUTH_SERVICE_NATS_SERVERS=nats://localhost:4222
AUTH_SERVICE_JWT_SECRET=
Expand Down
2 changes: 0 additions & 2 deletions dev/user-backend-nest/main/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,3 @@ lerna-debug.log*
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

src/client-infos.json
12 changes: 10 additions & 2 deletions dev/user-backend-nest/main/src/app.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,15 @@ import { ClientProxy } from '@nestjs/microservices';
import { AuthGuard } from '@nestjs/passport';
import { concatMap, map } from 'rxjs';
import * as infosJsonData from './infos.json';
import * as clientInfosJson from './client-infos.json';
import { ErrorsInterceptor } from './interceptors/errors.interceptor';
import { AuthorizationHelper } from './security/authorization.helper';
import { ConfigService } from '@nestjs/config';

@UseInterceptors(new ErrorsInterceptor())
@Controller()
export class AppController {
constructor(
private configService: ConfigService,
@Inject('FEATURES_SERVICE') private featuresClient: ClientProxy,
@Inject('AUTH_SERVICE') private authClient: ClientProxy,
@Inject('MAP_SERVICE') private mapClient: ClientProxy,
Expand Down Expand Up @@ -783,7 +784,14 @@ export class AppController {

@Get('/app-update-infos')
appUpdateInfos() {
return clientInfosJson;
return {
storeVersion: this.configService.get('APP_UPDATE_STORE_VERSION'),
minVersionRequired: this.configService.get(
'APP_UPDATE_MIN_VERSION_REQUIRED',
),
playStoreUrl: this.configService.get('APP_UPDATE_PLAY_STORE_URL'),
appStoreUrl: this.configService.get('APP_UPDATE_APP_STORE_URL'),
};
}

@Get('/health')
Expand Down
6 changes: 0 additions & 6 deletions dev/user-backend-nest/main/src/client-infos.json.dist

This file was deleted.

Loading