Skip to content

Commit

Permalink
fix migration filter ban events
Browse files Browse the repository at this point in the history
  • Loading branch information
MaGOs92 committed Nov 28, 2023
1 parent b0aa0ff commit fe6f664
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server/migrations/populate-events.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ async function main() {
await mongoClient.connect()

for await (const event of events) {
if (event.type === "adresselab" || event.type === "adresse-region") {
continue
}
await EventsService.createOne({
...event,
isSubscriptionClosed: !!event.isSubscriptionClosed,
Expand All @@ -17,9 +20,7 @@ async function main() {

main().catch(error => {
console.error(error)
// eslint-disable-next-line unicorn/no-process-exit
process.exit(1)
}).then(() => {
// eslint-disable-next-line unicorn/no-process-exit
process.exit(0)
})

0 comments on commit fe6f664

Please sign in to comment.