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, faviconUrl: instance.faviconUrl,
themeColor: instance.themeColor, themeColor: instance.themeColor,
infoUpdatedAt: instance.infoUpdatedAt ? instance.infoUpdatedAt.toISOString() : null, 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, optional: false, nullable: true,
format: 'date-time', format: 'date-time',
}, },
latestRequestReceivedAt: {
type: 'string',
optional: false, nullable: true,
format: 'date-time',
},
}, },
} as const; } as const;

View file

@ -52,7 +52,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</MkKeyValue> </MkKeyValue>
<MkKeyValue oneline style="margin: 1em 0;"> <MkKeyValue oneline style="margin: 1em 0;">
<template #key>{{ i18n.ts.latestRequestReceivedAt }}</template> <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> </MkKeyValue>
</FormSection> </FormSection>