Skip to content

Commit

Permalink
function key for cydig
Browse files Browse the repository at this point in the history
  • Loading branch information
Johanna Ahlskog committed Oct 2, 2023
1 parent 5972bc6 commit 83b8c83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { CyDigConfig } from './lib/types/CyDigConfig';
import * as core from '@actions/core';
import * as github from '@actions/github';

async function runUpdateComplianceStateTask(): Promise<void> {
async function runUploadComplianceStateTask(): Promise<void> {
try {
const codeRepositoryName: string = github.context.repo.repo;
const subscriptionId: string = core.getInput('subscriptionId');
Expand Down Expand Up @@ -32,4 +32,4 @@ async function runUpdateComplianceStateTask(): Promise<void> {
}
}

runUpdateComplianceStateTask();
runUploadComplianceStateTask();
6 changes: 4 additions & 2 deletions src/lib/ComplianceStateService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ export class ComplianceStateService {
subscriptionId: string
): Promise<void> {
// POST-request to Azure function
const urlUpdate: string = process.env.urlUpdate || '';
let urlUpload: string = process.env.urlUpload || '';
const uploadKey: string = process.env.uploadKey || '';
urlUpload = urlUpload + uploadKey;
const bodyBuilder: BodyBuilder = new BodyBuilder();
const responseBody: ResponseBody = bodyBuilder.createBody(
teamName,
Expand All @@ -21,7 +23,7 @@ export class ComplianceStateService {
);

await axios
.post(urlUpdate, responseBody, {
.post(urlUpload, responseBody, {
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
Expand Down

0 comments on commit 83b8c83

Please sign in to comment.