-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into renovate/registry.access.redhat.com-ubi9-s2i…
…-base
- Loading branch information
Showing
9 changed files
with
1,045 additions
and
542 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
import { SNSClient, PublishCommand } from "@aws-sdk/client-sns"; | ||
import { SNSClient, PublishCommand } from '@aws-sdk/client-sns'; | ||
|
||
import awsConfig from './awsCommon' | ||
import { awsSNSConfig } from './awsCommon'; | ||
|
||
export const snsClient = new SNSClient(awsConfig); | ||
export const snsClient = new SNSClient(awsSNSConfig); | ||
|
||
export const pushMessage = async (topic:string, uuid: string, body: string) => { | ||
export const pushMessage = async ( | ||
topic: string, | ||
uuid: string, | ||
body: string | ||
) => { | ||
const params = { | ||
Message: body, | ||
Subject: uuid, | ||
TopicArn: topic | ||
TopicArn: topic, | ||
}; | ||
|
||
const response = {result:''}; | ||
const response = { result: '' }; | ||
try { | ||
await snsClient.send(new PublishCommand(params)); | ||
response.result = 'Success'; | ||
} catch (e) { | ||
} catch (e) { | ||
response.result = `Error ${e.stack}`; | ||
} | ||
return Promise.resolve(response); | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.