Skip to content

Commit

Permalink
DOP-4549 added logs, return even later
Browse files Browse the repository at this point in the history
  • Loading branch information
anabellabuckvar committed Apr 30, 2024
1 parent 1223d57 commit 5309e04
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions api/controllers/v1/slack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,18 +215,19 @@ export const DeployRepo = async (event: any = {}): Promise<any> => {

let values = [];
const isAdmin = await repoEntitlementRepository.getIsAdmin(parsed.user.id);
console.log(isAdmin);
return {
statusCode: 200,
headers: { 'Content-Type': 'application/json' },
};
console.log('ADMIN' + isAdmin);
try {
values = await slackConnector.parseSelection(stateValues, isAdmin, repoBranchesRepository);
} catch (e) {
console.log(`Error parsing selection: ${e}`);
return prepResponse(401, 'text/plain', e);
}
const deployable = await getDeployableJobs(values, entitlement, repoBranchesRepository, docsetsRepository);
console.log('DEPLOYABLE' + deployable);
return {
statusCode: 200,
headers: { 'Content-Type': 'application/json' },
};

if (deployable.length > 0) {
await deployRepo(deployable, consoleLogger, jobRepository, c.get('jobsQueueUrl'));
Expand Down

0 comments on commit 5309e04

Please sign in to comment.