Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit44f0f27

Browse files
committed
fix: only send webhook if record is published
1 parent2ab5699 commit44f0f27

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎apps/api/src/controllers/record/records-controller.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ export class RecordsController {
8484
});
8585

8686
constdraftRecords=awaitprisma.record.findMany({
87-
// todo: visualize in the FE
8887
take:12,
8988
where:{
9089
publishStatus:"DRAFT",
@@ -501,7 +500,10 @@ export class RecordsController {
501500
},
502501
});
503502

504-
awaitthis.handleDiscordWebhook(recordItemasany);
503+
// Only send a Discord webhook if the record is published
504+
if(recordItem.publishStatus===PublishStatus.PUBLISHED){
505+
awaitthis.handleDiscordWebhook(recordItemasany);
506+
}
505507

506508
returnrecordItem;
507509
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp