mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 09:30:09 +00:00
review fixes
This commit is contained in:
@@ -270,7 +270,10 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
projectId: req.params.workspaceId,
|
||||
event: {
|
||||
type: EventType.DELETE_PROJECT,
|
||||
metadata: {}
|
||||
metadata: {
|
||||
projectId: workspace.id,
|
||||
projectName: workspace.name
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -315,9 +318,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
projectId: req.params.workspaceId,
|
||||
event: {
|
||||
type: EventType.UPDATE_PROJECT,
|
||||
metadata: {
|
||||
name: req.body.name
|
||||
}
|
||||
metadata: req.body
|
||||
}
|
||||
});
|
||||
|
||||
@@ -406,14 +407,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
projectId: req.params.workspaceId,
|
||||
event: {
|
||||
type: EventType.UPDATE_PROJECT,
|
||||
metadata: {
|
||||
...(req.body.name !== undefined && { name: req.body.name }),
|
||||
...(req.body.description !== undefined && { description: req.body.description }),
|
||||
...(req.body.autoCapitalization !== undefined && { autoCapitalization: req.body.autoCapitalization }),
|
||||
...(req.body.hasDeleteProtection !== undefined && { hasDeleteProtection: req.body.hasDeleteProtection }),
|
||||
...(req.body.slug !== undefined && { slug: req.body.slug }),
|
||||
...(req.body.secretSharing !== undefined && { secretSharing: req.body.secretSharing })
|
||||
}
|
||||
metadata: req.body
|
||||
}
|
||||
});
|
||||
|
||||
@@ -460,9 +454,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
projectId: req.params.workspaceId,
|
||||
event: {
|
||||
type: EventType.UPDATE_PROJECT,
|
||||
metadata: {
|
||||
autoCapitalization: req.body.autoCapitalization
|
||||
}
|
||||
metadata: req.body
|
||||
}
|
||||
});
|
||||
|
||||
@@ -510,9 +502,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
projectId: req.params.workspaceId,
|
||||
event: {
|
||||
type: EventType.UPDATE_PROJECT,
|
||||
metadata: {
|
||||
hasDeleteProtection: req.body.hasDeleteProtection
|
||||
}
|
||||
metadata: req.body
|
||||
}
|
||||
});
|
||||
|
||||
@@ -560,9 +550,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
projectId: workspace.id,
|
||||
event: {
|
||||
type: EventType.UPDATE_PROJECT,
|
||||
metadata: {
|
||||
pitVersionLimit: req.body.pitVersionLimit
|
||||
}
|
||||
metadata: req.body
|
||||
}
|
||||
});
|
||||
|
||||
@@ -610,9 +598,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
projectId: workspace.id,
|
||||
event: {
|
||||
type: EventType.UPDATE_PROJECT,
|
||||
metadata: {
|
||||
auditLogsRetentionDays: req.body.auditLogsRetentionDays
|
||||
}
|
||||
metadata: req.body
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -212,21 +212,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
projectId: project.id,
|
||||
event: {
|
||||
type: EventType.CREATE_PROJECT,
|
||||
metadata: {
|
||||
actorId: req.permission.id,
|
||||
actor: req.permission.type,
|
||||
actorOrgId: req.permission.orgId,
|
||||
actorAuthMethod: req.permission.authMethod,
|
||||
...(req.body.projectName !== undefined && { workspaceName: req.body.projectName }),
|
||||
...(req.body.projectDescription !== undefined && { workspaceDescription: req.body.projectDescription }),
|
||||
...(req.body.slug !== undefined && { slug: req.body.slug }),
|
||||
...(req.body.kmsKeyId !== undefined && { kmsKeyId: req.body.kmsKeyId }),
|
||||
...(req.body.template !== undefined && { template: req.body.template }),
|
||||
...(req.body.type !== undefined && { type: req.body.type }),
|
||||
...(req.body.shouldCreateDefaultEnvs !== undefined && {
|
||||
createDefaultEnvs: req.body.shouldCreateDefaultEnvs
|
||||
})
|
||||
}
|
||||
metadata: req.body
|
||||
}
|
||||
});
|
||||
|
||||
@@ -278,7 +264,10 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
projectId: project.id,
|
||||
event: {
|
||||
type: EventType.DELETE_PROJECT,
|
||||
metadata: {}
|
||||
metadata: {
|
||||
projectId: project.id,
|
||||
projectName: project.name
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -367,12 +356,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
projectId: project.id,
|
||||
event: {
|
||||
type: EventType.UPDATE_PROJECT,
|
||||
metadata: {
|
||||
...(req.body.name !== undefined && { name: req.body.name }),
|
||||
...(req.body.description !== undefined && { description: req.body.description }),
|
||||
...(req.body.autoCapitalization !== undefined && { autoCapitalization: req.body.autoCapitalization }),
|
||||
...(req.body.hasDeleteProtection !== undefined && { hasDeleteProtection: req.body.hasDeleteProtection })
|
||||
}
|
||||
metadata: req.body
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user