mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +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]),
|
||||
handler: async (req) => {
|
||||
const secretManagerKmsKey = await server.services.project.getProjectSecretManagerKmsKey({
|
||||
const kmsKeys = await server.services.project.getProjectKmsKeys({
|
||||
actor: req.permission.type,
|
||||
actorId: req.permission.id,
|
||||
actorAuthMethod: req.permission.authMethod,
|
||||
@@ -202,9 +202,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
projectId: req.params.workspaceId
|
||||
});
|
||||
|
||||
return {
|
||||
secretManagerKmsKey
|
||||
};
|
||||
return kmsKeys;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -772,13 +772,7 @@ export const projectServiceFactory = ({
|
||||
return kmsBackup;
|
||||
};
|
||||
|
||||
const getProjectSecretManagerKmsKey = async ({
|
||||
projectId,
|
||||
actor,
|
||||
actorId,
|
||||
actorAuthMethod,
|
||||
actorOrgId
|
||||
}: TGetProjectKmsKey) => {
|
||||
const getProjectKmsKeys = async ({ projectId, actor, actorId, actorAuthMethod, actorOrgId }: TGetProjectKmsKey) => {
|
||||
const { membership } = await permissionService.getProjectPermission(
|
||||
actor,
|
||||
actorId,
|
||||
@@ -796,7 +790,7 @@ export const projectServiceFactory = ({
|
||||
const kmsKeyId = await kmsService.getProjectSecretManagerKmsKeyId(projectId);
|
||||
const kmsKey = await kmsService.getKmsById(kmsKeyId);
|
||||
|
||||
return kmsKey;
|
||||
return { secretManagerKmsKey: kmsKey };
|
||||
};
|
||||
|
||||
return {
|
||||
@@ -816,6 +810,6 @@ export const projectServiceFactory = ({
|
||||
updateProjectKmsKey,
|
||||
getProjectKmsBackup,
|
||||
loadProjectKmsBackup,
|
||||
getProjectSecretManagerKmsKey
|
||||
getProjectKmsKeys
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user