mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 19:28:35 +00:00
Preliminary Vercel integration
This commit is contained in:
@@ -4,7 +4,6 @@ import axios from 'axios';
|
||||
import { readFileSync } from 'fs';
|
||||
import { IntegrationAuth, Integration } from '../models';
|
||||
import { INTEGRATION_SET, ENV_DEV } from '../variables';
|
||||
import { OAUTH_CLIENT_SECRET_HEROKU, OAUTH_TOKEN_URL_HEROKU } from '../config';
|
||||
import { IntegrationService } from '../services';
|
||||
import { getApps } from '../integrations';
|
||||
|
||||
|
||||
@@ -31,17 +31,21 @@ interface PushSecret {
|
||||
export const updateIntegration = async (req: Request, res: Response) => {
|
||||
let integration;
|
||||
|
||||
// TODO: add integration-specific validation to ensure that each
|
||||
// integration has the correct fields populated in [Integration]
|
||||
|
||||
try {
|
||||
const { app, environment, isActive } = req.body;
|
||||
const { app, environment, isActive, target } = req.body;
|
||||
|
||||
integration = await Integration.findOneAndUpdate(
|
||||
{
|
||||
_id: req.integration._id
|
||||
},
|
||||
{
|
||||
app,
|
||||
environment,
|
||||
isActive
|
||||
isActive,
|
||||
app,
|
||||
target
|
||||
},
|
||||
{
|
||||
new: true
|
||||
@@ -49,7 +53,6 @@ export const updateIntegration = async (req: Request, res: Response) => {
|
||||
);
|
||||
|
||||
if (integration) {
|
||||
|
||||
// trigger event - push secrets
|
||||
EventService.handleEvent({
|
||||
event: eventPushSecrets({
|
||||
|
||||
Reference in New Issue
Block a user