add secretGroup to integrationController.ts

This commit is contained in:
Chukwunonso Frank
2023-07-26 18:19:54 +01:00
parent c2be6674b1
commit 46545c1462
9 changed files with 19 additions and 11 deletions
@@ -27,7 +27,8 @@ export const createIntegration = async (req: Request, res: Response) => {
owner,
path,
region,
secretPath
secretPath,
secretGroup
} = req.body;
const folders = await Folder.findOne({
@@ -61,6 +62,7 @@ export const createIntegration = async (req: Request, res: Response) => {
path,
region,
secretPath,
secretGroup,
integration: req.integrationAuth.integration,
integrationAuth: new Types.ObjectId(integrationAuthId)
}).save();
+1
View File
@@ -2109,6 +2109,7 @@ const syncSecretsCodefresh = async ({
}
);
};
/* Sync/push [secrets] to Northflank
* @param {Object} obj
* @param {IIntegration} obj.integration - integration details
+1
View File
@@ -168,6 +168,7 @@ const integrationSchema = new Schema<IIntegration>(
default: "/",
},
secretGroup: {
// northflank-specific service
type: String,
default: null,
},
+1
View File
@@ -37,6 +37,7 @@ router.post(
body("owner").trim(),
body("path").trim(),
body("region").trim(),
body("secretGroup").isString().trim(),
validateRequest,
integrationController.createIntegration
);