mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 10:17:15 +02:00
fix: wrong database key
This commit is contained in:
@@ -77,5 +77,6 @@
|
||||
"analytics.hourly": "Hourly",
|
||||
"analytics.daily": "Daily",
|
||||
|
||||
"errors.intro": "The following errors were recorded by this instance within the last 24 hours."
|
||||
"errors.intro": "The following errors were recorded by this instance within the last 24 hours.",
|
||||
"errors.payload-gone": "The payload for this error no longer exists."
|
||||
}
|
||||
@@ -87,8 +87,8 @@ federationController.analytics = async function (req, res) {
|
||||
};
|
||||
|
||||
federationController.errors = async function (req, res) {
|
||||
const ids = await db.getSortedSetRangeByScore('ap:errors', 0, -1, '-inf', Date.now());
|
||||
const payloads = await db.mget(ids.map(id => `ap:errors:${id}`));
|
||||
const ids = await db.getSortedSetRangeByScore('ap.errors', 0, -1, '-inf', Date.now());
|
||||
const payloads = await db.mget(ids.map(id => `ap.errors:${id}`));
|
||||
const errors = ids.map((id, idx) => {
|
||||
return { id, payload: payloads[idx] };
|
||||
});
|
||||
|
||||
@@ -8,7 +8,11 @@
|
||||
{{{ each errors }}}
|
||||
<details>
|
||||
<summary>{./id}</summary>
|
||||
{{{ if ./payload }}}
|
||||
<pre class="m-2 border p-2"><code>{./payload}</code></pre>
|
||||
{{{ else }}}
|
||||
<em>[[admin/settings/activitypub:errors.payload-gone]]</em>
|
||||
{{{ end }}}
|
||||
</details>
|
||||
{{{ end }}}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user