mirror of
https://github.com/svemagie/indiekit-endpoint-activitypub.git
synced 2026-04-02 15:44:58 +02:00
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:
4
index.js
4
index.js
@@ -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 },
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user