-
-
Notifications
You must be signed in to change notification settings - Fork 5
feat: fourthwall update command #265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
8e326f1
to
fc3d28a
Compare
src/services/discord.service.ts
Outdated
if (id) { | ||
await this.updateOrder({ id, user, password }); | ||
} | ||
|
||
for await (const { id } of this.database.streamFourthwallOrders()) { | ||
await this.updateOrder({ id, user, password }); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need a return, or this'll always fall through :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:monakS: I swear that was there at some point lol
@@ -207,6 +207,8 @@ export class WebhookService { | |||
} | |||
const dtoOrder = dto.type === 'ORDER_PLACED' ? dto.data : dto.data.order; | |||
|
|||
await new Promise((resolve) => setTimeout(resolve, 10_000)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this'll block the webhook which might make things unhappy? Idk if it's allowed in node but it might be better to send off a promise that does the whole write, and return on the webhook immediately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh that's a good call!
fc3d28a
to
1fa39a2
Compare
No description provided.