diff --git a/backend/src/modules/catalog/controller.ts b/backend/src/modules/catalog/controller.ts index de10f20e9..ac4f6d319 100644 --- a/backend/src/modules/catalog/controller.ts +++ b/backend/src/modules/catalog/controller.ts @@ -45,6 +45,7 @@ export async function getCatalog(term: TermInput, info: GraphQLResolveInfo): Pro fromDate: { $lte: getTermStartMonth(term) }, }, { + _updatedAt: 1, _updated: 1, identifiers: 1, title: 1, diff --git a/backend/src/modules/catalog/formatter.ts b/backend/src/modules/catalog/formatter.ts index b1f3f6b09..486e41b3f 100644 --- a/backend/src/modules/catalog/formatter.ts +++ b/backend/src/modules/catalog/formatter.ts @@ -7,7 +7,7 @@ import { stringToTerm } from "../../utils/term"; export function formatMetadata(data: any) { return { - lastUpdated: data._updated as Date, + lastUpdated: (!data._updated) ? data._updatedAt as Date : data._updated as Date, raw: data, } }