Skip to content

Commit

Permalink
[aksel.nav.no] Adjust list of outdated articles (#3234)
Browse files Browse the repository at this point in the history
  • Loading branch information
HalvorHaugan authored Oct 15, 2024
1 parent 1e40d96 commit 8a8bf0a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function listOutdatedArticles(
S.documentTypeList(type)
.title("Artikler")
.filter(
`_type == $type && (dateTime(updateInfo.lastVerified + "T00:00:00Z") < dateTime(now()) - 60*60*24*${threshold})`,
`_type == $type && (dateTime(updateInfo.lastVerified + "T00:00:00Z") < dateTime(now()) - 60*60*24*$threshold) && !(_id in path("drafts.**"))`,
)
.apiVersion(SANITY_API_VERSION)
.params({ type, threshold })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,11 @@ export const KomponentArtikkel = defineType({
}),
BaseSEOPreset,
],
orderings: [
{
title: "Sist godkjent",
name: "lastVerified",
by: [{ field: "updateInfo.lastVerified", direction: "asc" }],
},
],
});

0 comments on commit 8a8bf0a

Please sign in to comment.