@@ -40,6 +40,7 @@ import {
4040import  {  getRoleCredentials  }  from  "api/functions/sts.js" ; 
4141import  {  SecretsManagerClient  }  from  "@aws-sdk/client-secrets-manager" ; 
4242import  {  createAuditLogEntry  }  from  "api/functions/auditLog.js" ; 
43+ import  {  Modules  }  from  "common/modules.js" ; 
4344
4445const  iamRoutes : FastifyPluginAsync  =  async  ( fastify ,  _options )  =>  { 
4546  const  getAuthorizedClients  =  async  ( )  =>  { 
@@ -185,7 +186,7 @@ const iamRoutes: FastifyPluginAsync = async (fastify, _options) => {
185186        const  logPromise  =  createAuditLogEntry ( { 
186187          dynamoClient : fastify . dynamoClient , 
187188          entry : { 
188-             module : "iam" , 
189+             module : Modules . IAM , 
189190            actor : request . username ! , 
190191            target : groupId , 
191192            message : `set target roles to ${ request . body . roles . toString ( ) }  ` , 
@@ -252,7 +253,7 @@ const iamRoutes: FastifyPluginAsync = async (fastify, _options) => {
252253            createAuditLogEntry ( { 
253254              dynamoClient : fastify . dynamoClient , 
254255              entry : { 
255-                 module : "iam" , 
256+                 module : Modules . IAM , 
256257                actor : request . username ! , 
257258                target : emails [ i ] , 
258259                message : "Invited user to Entra ID tenant." , 
@@ -266,7 +267,7 @@ const iamRoutes: FastifyPluginAsync = async (fastify, _options) => {
266267            createAuditLogEntry ( { 
267268              dynamoClient : fastify . dynamoClient , 
268269              entry : { 
269-                 module : "iam" , 
270+                 module : Modules . IAM , 
270271                actor : request . username ! , 
271272                target : emails [ i ] , 
272273                message : "Failed to invite user to Entra ID tenant." , 
@@ -372,7 +373,7 @@ const iamRoutes: FastifyPluginAsync = async (fastify, _options) => {
372373            createAuditLogEntry ( { 
373374              dynamoClient : fastify . dynamoClient , 
374375              entry : { 
375-                 module : "iam" , 
376+                 module : Modules . IAM , 
376377                actor : request . username ! , 
377378                target : request . body . add [ i ] , 
378379                message : `added target to group ID ${ groupId }  ` , 
@@ -385,7 +386,7 @@ const iamRoutes: FastifyPluginAsync = async (fastify, _options) => {
385386            createAuditLogEntry ( { 
386387              dynamoClient : fastify . dynamoClient , 
387388              entry : { 
388-                 module : "iam" , 
389+                 module : Modules . IAM , 
389390                actor : request . username ! , 
390391                target : request . body . add [ i ] , 
391392                message : `failed to add target to group ID ${ groupId }  ` , 
@@ -414,7 +415,7 @@ const iamRoutes: FastifyPluginAsync = async (fastify, _options) => {
414415            createAuditLogEntry ( { 
415416              dynamoClient : fastify . dynamoClient , 
416417              entry : { 
417-                 module : "iam" , 
418+                 module : Modules . IAM , 
418419                actor : request . username ! , 
419420                target : request . body . add [ i ] , 
420421                message : `remove target from group ID ${ groupId }  ` , 
@@ -427,7 +428,7 @@ const iamRoutes: FastifyPluginAsync = async (fastify, _options) => {
427428            createAuditLogEntry ( { 
428429              dynamoClient : fastify . dynamoClient , 
429430              entry : { 
430-                 module : "iam" , 
431+                 module : Modules . IAM , 
431432                actor : request . username ! , 
432433                target : request . body . add [ i ] , 
433434                message : `failed to remove target from group ID ${ groupId }  ` , 
0 commit comments