Skip to content

Commit

Permalink
fix: add missing await for subscribing (#15)
Browse files Browse the repository at this point in the history
* fix: add missing `await`
* fix: remove unwanted async for unsubscribe
  • Loading branch information
Barbapapazes authored Mar 18, 2024
1 parent 950bfc7 commit 6ea60f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions providers/transmit_provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ export default class TransmitProvider {
transmit.$createStream(ctx)
})

router.post('__transmit/subscribe', (ctx) => {
router.post('__transmit/subscribe', async (ctx) => {
const uid = ctx.request.input('uid')
const channel = ctx.request.input('channel')

const success = transmit.$subscribeToChannel(uid, channel, ctx)
const success = await transmit.$subscribeToChannel(uid, channel, ctx)

if (!success) {
return ctx.response.badRequest()
Expand Down

0 comments on commit 6ea60f2

Please sign in to comment.