@@ -18,17 +18,17 @@ import {
18
18
ApiSecurity ,
19
19
ApiTags
20
20
} from '@nestjs/swagger'
21
+ import {
22
+ RefreshJddCommand ,
23
+ RefreshJddCommandHandler
24
+ } from '../../application/commands/support//refresh-jdd.command.handler'
25
+ import { ArchiverJeuneSupportCommandHandler } from '../../application/commands/support/archiver-jeune-support.command.handler'
21
26
import { CreerSuperviseursCommandHandler } from '../../application/commands/support/creer-superviseurs.command.handler'
22
27
import { DeleteSuperviseursCommandHandler } from '../../application/commands/support/delete-superviseurs.command.handler'
23
28
import {
24
29
MettreAJourLesJeunesCEJPoleEmploiCommand ,
25
30
MettreAJourLesJeunesCejPeCommandHandler
26
31
} from '../../application/commands/support/mettre-a-jour-les-jeunes-cej-pe.command.handler'
27
- import {
28
- RefreshJddCommand ,
29
- RefreshJddCommandHandler
30
- } from '../../application/commands/support//refresh-jdd.command.handler'
31
- import { ArchiverJeuneSupportCommandHandler } from '../../application/commands/support/archiver-jeune-support.command.handler'
32
32
import {
33
33
ChangementAgenceQueryModel ,
34
34
UpdateAgenceConseillerCommandHandler
@@ -38,9 +38,10 @@ import { Authentification } from '../../domain/authentification'
38
38
import { ApiKeyAuthGuard } from '../auth/api-key.auth-guard'
39
39
import { SkipOidcAuth } from '../decorators/skip-oidc-auth.decorator'
40
40
import { handleResult } from './result.handler'
41
- import { SuperviseursPayload } from './validation/conseillers.inputs'
42
41
import {
43
42
ChangerAgenceConseillerPayload ,
43
+ CreateSuperviseursPayload ,
44
+ DeleteSuperviseursPayload ,
44
45
RefreshJDDPayload ,
45
46
TeleverserCsvPayload ,
46
47
TransfererJeunesPayload
@@ -191,10 +192,13 @@ export class SupportController {
191
192
} )
192
193
@Post ( 'superviseurs' )
193
194
async postSuperviseurs (
194
- @Body ( ) superviseursPayload : SuperviseursPayload
195
+ @Body ( ) superviseursPayload : CreateSuperviseursPayload
195
196
) : Promise < void > {
196
197
const result = await this . creerSuperviseursCommandHandler . execute (
197
- { superviseurs : superviseursPayload . superviseurs } ,
198
+ {
199
+ superviseurs : superviseursPayload . superviseurs ,
200
+ superEmailFT : superviseursPayload . superEmailFT
201
+ } ,
198
202
Authentification . unUtilisateurSupport ( )
199
203
)
200
204
@@ -212,10 +216,10 @@ export class SupportController {
212
216
@Delete ( 'superviseurs' )
213
217
@HttpCode ( HttpStatus . NO_CONTENT )
214
218
async deleteSuperviseurs (
215
- @Body ( ) superviseursPayload : SuperviseursPayload
219
+ @Body ( ) superviseursPayload : DeleteSuperviseursPayload
216
220
) : Promise < void > {
217
221
const result = await this . deleteSuperviseursCommandHandler . execute (
218
- { superviseurs : superviseursPayload . superviseurs } ,
222
+ { emails : superviseursPayload . emails } ,
219
223
Authentification . unUtilisateurSupport ( )
220
224
)
221
225
0 commit comments