fix: remove await in non-async init() causing SyntaxError on startup

dropIndex() was called with await inside the non-async init() method,
causing "Unexpected reserved word" and preventing Indiekit from starting.
Use promise .catch() instead since the result isn't needed.
This commit is contained in:
Ricardo
2026-02-23 23:31:11 +01:00
parent 18a17b054a
commit a95d68c98f
2 changed files with 3 additions and 3 deletions

View File

@@ -952,8 +952,8 @@ export default class ActivityPubEndpoint {
// Drop non-sparse indexes if they exist (created by earlier versions),
// then recreate with sparse:true so multiple null values are allowed.
try { await this._collections.ap_muted.dropIndex("url_1"); } catch {}
try { await this._collections.ap_muted.dropIndex("keyword_1"); } catch {}
this._collections.ap_muted.dropIndex("url_1").catch(() => {});
this._collections.ap_muted.dropIndex("keyword_1").catch(() => {});
this._collections.ap_muted.createIndex(
{ url: 1 },
{ unique: true, sparse: true, background: true },

View File

@@ -1,6 +1,6 @@
{
"name": "@rmdes/indiekit-endpoint-activitypub",
"version": "2.0.15",
"version": "2.0.16",
"description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.",
"keywords": [
"indiekit",