@@ -67,7 +67,9 @@ export class Controller {
67
67
infoLogger ( `Fetching contacts…` , providerConfig ) ;
68
68
69
69
const fetchedContacts : Contact [ ] = await this . adapter . getContacts (
70
- providerConfig
70
+ providerConfig ,
71
+ req ,
72
+ res
71
73
) ;
72
74
73
75
if ( ! validate ( this . ajv , contactsSchema , fetchedContacts ) ) {
@@ -143,7 +145,9 @@ export class Controller {
143
145
144
146
const contact : Contact = await this . adapter . createContact (
145
147
req . providerConfig ,
146
- req . body as ContactTemplate
148
+ req . body as ContactTemplate ,
149
+ req ,
150
+ res
147
151
) ;
148
152
149
153
const valid = validate ( this . ajv , contactsSchema , [ contact ] ) ;
@@ -199,7 +203,9 @@ export class Controller {
199
203
const contact : Contact = await this . adapter . updateContact (
200
204
req . providerConfig ,
201
205
req . params . id ,
202
- req . body as ContactUpdate
206
+ req . body as ContactUpdate ,
207
+ req ,
208
+ res
203
209
) ;
204
210
205
211
const valid = validate ( this . ajv , contactsSchema , [ contact ] ) ;
@@ -252,7 +258,7 @@ export class Controller {
252
258
console . log ( `Deleting contact for key "${ anonymizeKey ( apiKey ) } "` ) ;
253
259
254
260
const contactId : string = req . params . id ;
255
- await this . adapter . deleteContact ( req . providerConfig , contactId ) ;
261
+ await this . adapter . deleteContact ( req . providerConfig , contactId , req , res ) ;
256
262
257
263
if ( this . adapter . getToken && req . providerConfig ) {
258
264
const { apiKey } = await this . adapter . getToken ( req . providerConfig ) ;
0 commit comments