fix: lastReceivedAt always being N/A

This commit is contained in:
Mar0xy 2023-11-07 18:30:04 +01:00
parent ccd3789cc6
commit 53f2089116
No known key found for this signature in database
GPG Key ID: 56569BBE47D2C828
3 changed files with 7 additions and 1 deletions

View File

@ -47,6 +47,7 @@ export class InstanceEntityService {
faviconUrl: instance.faviconUrl,
themeColor: instance.themeColor,
infoUpdatedAt: instance.infoUpdatedAt ? instance.infoUpdatedAt.toISOString() : null,
latestRequestReceivedAt: instance.latestRequestReceivedAt ? instance.latestRequestReceivedAt.toISOString() : null,
};
}

View File

@ -103,5 +103,10 @@ export const packedFederationInstanceSchema = {
optional: false, nullable: true,
format: 'date-time',
},
latestRequestReceivedAt: {
type: 'string',
optional: false, nullable: true,
format: 'date-time',
},
},
} as const;

View File

@ -52,7 +52,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</MkKeyValue>
<MkKeyValue oneline style="margin: 1em 0;">
<template #key>{{ i18n.ts.latestRequestReceivedAt }}</template>
<template #value><MkTime v-if="instance.latestRequestReceivedAt" :time="instance.latestRequestReceivedAt"/><span v-else>N/A</span></template>
<template #value><MkTime v-if="instance.latestRequestReceivedAt" mode="detail" :time="instance.latestRequestReceivedAt"/><span v-else>N/A</span></template>
</MkKeyValue>
</FormSection>