mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 23:27:14 +00:00
misc: renamed project method
This commit is contained in:
@@ -194,7 +194,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
},
|
},
|
||||||
onRequest: verifyAuth([AuthMode.JWT]),
|
onRequest: verifyAuth([AuthMode.JWT]),
|
||||||
handler: async (req) => {
|
handler: async (req) => {
|
||||||
const secretManagerKmsKey = await server.services.project.getProjectSecretManagerKmsKey({
|
const kmsKeys = await server.services.project.getProjectKmsKeys({
|
||||||
actor: req.permission.type,
|
actor: req.permission.type,
|
||||||
actorId: req.permission.id,
|
actorId: req.permission.id,
|
||||||
actorAuthMethod: req.permission.authMethod,
|
actorAuthMethod: req.permission.authMethod,
|
||||||
@@ -202,9 +202,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
projectId: req.params.workspaceId
|
projectId: req.params.workspaceId
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return kmsKeys;
|
||||||
secretManagerKmsKey
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -772,13 +772,7 @@ export const projectServiceFactory = ({
|
|||||||
return kmsBackup;
|
return kmsBackup;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getProjectSecretManagerKmsKey = async ({
|
const getProjectKmsKeys = async ({ projectId, actor, actorId, actorAuthMethod, actorOrgId }: TGetProjectKmsKey) => {
|
||||||
projectId,
|
|
||||||
actor,
|
|
||||||
actorId,
|
|
||||||
actorAuthMethod,
|
|
||||||
actorOrgId
|
|
||||||
}: TGetProjectKmsKey) => {
|
|
||||||
const { membership } = await permissionService.getProjectPermission(
|
const { membership } = await permissionService.getProjectPermission(
|
||||||
actor,
|
actor,
|
||||||
actorId,
|
actorId,
|
||||||
@@ -796,7 +790,7 @@ export const projectServiceFactory = ({
|
|||||||
const kmsKeyId = await kmsService.getProjectSecretManagerKmsKeyId(projectId);
|
const kmsKeyId = await kmsService.getProjectSecretManagerKmsKeyId(projectId);
|
||||||
const kmsKey = await kmsService.getKmsById(kmsKeyId);
|
const kmsKey = await kmsService.getKmsById(kmsKeyId);
|
||||||
|
|
||||||
return kmsKey;
|
return { secretManagerKmsKey: kmsKey };
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -816,6 +810,6 @@ export const projectServiceFactory = ({
|
|||||||
updateProjectKmsKey,
|
updateProjectKmsKey,
|
||||||
getProjectKmsBackup,
|
getProjectKmsBackup,
|
||||||
loadProjectKmsBackup,
|
loadProjectKmsBackup,
|
||||||
getProjectSecretManagerKmsKey
|
getProjectKmsKeys
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user