Skip to content

Commit

Permalink
fix: replace carto coordo urls (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
abelkhay authored Jun 15, 2023
1 parent f003667 commit 5bd024c
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 17 deletions.

This file was deleted.

1 change: 0 additions & 1 deletion src/features/coordinateurs/data/configuration/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { Conseiller } from '../../../models';
import { ConseillersRepository } from '../../../reporitories';
import { DATA_COORDINATEURS_CONFIGURATION } from '../../configuration';
import { DATA_COORDINATEURS_CONFIGURATION } from '../../../../../root';

export class ConseillersHttp extends ConseillersRepository {
public constructor(private readonly httpClient: HttpClient) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { Coordinateur } from '../../../models';
import { CoordinateursRepository } from '../../../reporitories';
import { DATA_COORDINATEURS_CONFIGURATION } from '../../configuration';
import { DATA_COORDINATEURS_CONFIGURATION } from '../../../../..//root';

export class CoordinateursHttp extends CoordinateursRepository {
public constructor(private readonly httpClient: HttpClient) {
Expand Down
1 change: 0 additions & 1 deletion src/features/coordinateurs/data/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from './http';
export * from './configuration';
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { POSITION_CONFIGURATION, ZOOM_LEVEL_CONFIGURATION } from '../../../../root';
import { DATA_COORDINATEURS_CONFIGURATION } from '../../data/configuration';
import { DATA_COORDINATEURS_CONFIGURATION, POSITION_CONFIGURATION, ZOOM_LEVEL_CONFIGURATION } from '../../../../root';

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,19 @@ import { createCustomElement } from '@angular/elements';
import { CoordinateursWebComponentLayout } from '../../../layouts';
import { CoordinateursCommonModule } from '../../common/coordinateurs.common.module';
import { CoordinateursWebComponentRoutingModule } from './coordinateurs.web-component-routing.module';
import { ASSETS_CONFIGURATION, ASSETS_TOKEN } from '../../../../../root';
import { coordinateursProviders } from '../../common';

@NgModule({
declarations: [CoordinateursWebComponentLayout],
imports: [BrowserAnimationsModule, CoordinateursCommonModule, CoordinateursWebComponentRoutingModule]
imports: [BrowserAnimationsModule, CoordinateursCommonModule, CoordinateursWebComponentRoutingModule],
providers: [
...coordinateursProviders,
{
provide: ASSETS_TOKEN,
useValue: ASSETS_CONFIGURATION
}
]
})
export class CoordinateursWebComponentModule implements DoBootstrap {
public constructor(private injector: Injector) {
Expand Down
2 changes: 1 addition & 1 deletion src/root/configuration/assets.configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const ASSETS_TOKEN: InjectionToken<AssetsConfiguration> = new InjectionTo
);

export const ASSETS_CONFIGURATION: AssetsConfiguration = {
path: 'https://cdn.jsdelivr.net/npm/@gouvfr-anct/cartographie-nationale@5.10.1/assets'
path: 'https://cdn.jsdelivr.net/npm/@gouvfr-anct/cartographie-nationale@5.11.0/assets'
};

export const ASSETS_APPLICATION_CONFIGURATION: AssetsConfiguration = {
Expand Down
10 changes: 10 additions & 0 deletions src/root/configuration/data.configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ export type DataConfiguration = {
lieuxDeMediationNumerique: string;
};

export type DataCoordinateursConfiguration = {
conseillers: string;
coordinateurs: string;
};

export const DATA_COORDINATEURS_CONFIGURATION: DataCoordinateursConfiguration = {
conseillers: 'https://beta.api.conseiller-numerique.gouv.fr/coordination-conseillers',
coordinateurs: 'https://beta.api.conseiller-numerique.gouv.fr/coordinateurs'
};

export const DATA_TOKEN: InjectionToken<DataConfiguration> = new InjectionToken<DataConfiguration>('data.configuration');

export const DATA_CONFIGURATION: DataConfiguration = {
Expand Down

0 comments on commit 5bd024c

Please sign in to comment.