Added transaction to creating an SES setting & upgraded to Prisma ORM 6 (#109)
* Added transaction to creating SES setting & upgraded Prisma to Prisma ORM 6 * Keep logging of the queue status in --------- Co-authored-by: Kumarion <121711454+Kumarion@users.noreply.github.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import {
|
||||
SNSClient,
|
||||
CreateTopicCommand,
|
||||
SubscribeCommand,
|
||||
DeleteTopicCommand,
|
||||
} from "@aws-sdk/client-sns";
|
||||
import { env } from "~/env";
|
||||
|
||||
@@ -25,6 +26,11 @@ export async function createTopic(topic: string, region: string) {
|
||||
return data.TopicArn;
|
||||
}
|
||||
|
||||
export async function deleteTopic(topicArn: string, region: string) {
|
||||
const client = getSnsClient(region);
|
||||
await client.send(new DeleteTopicCommand({ TopicArn: topicArn }));
|
||||
}
|
||||
|
||||
export async function subscribeEndpoint(
|
||||
topicArn: string,
|
||||
endpointUrl: string,
|
||||
|
||||
Reference in New Issue
Block a user