Skip to content

Commit

Permalink
fix(webhooks): order webhooks by updated_at desc
Browse files Browse the repository at this point in the history
  • Loading branch information
enudler committed Sep 16, 2020
1 parent 28ce997 commit a14453a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async function init(sequelizeClient) {

async function getAllWebhooks() {
const webhooksModel = client.model(WEBHOOKS_TABLE_NAME);
const webhooks = await webhooksModel.findAll({ include: ['events'] });
const webhooks = await webhooksModel.findAll({ include: ['events'], order: ['updated_at', 'DESC'] });
return webhooks.map(parseWebhook);
}

Expand Down

0 comments on commit a14453a

Please sign in to comment.