fix(repository): make sure to sort by lastPushedAt DESC with nulls last@@ -27,6 +27,12 @@ const getOrganizationDetailsView: ReqHandler = async (request, reply) => {
owner: true,
repositories: {
where: { visibility: ResourceVisibility.PUBLIC },
+ orderBy: {
+ lastPushedAt: {
+ sort: "desc",
+ nulls: "last",
+ },
+ },
},
})) as Organization & {
memberships: OrganizationMembership[];
@@ -21,7 +21,10 @@ const getOrganizationRepositories: ServiceMethodFactory<
},
},
orderBy: {
- lastPushedAt: "desc",
+ lastPushedAt: {
+ sort: "desc",
+ nulls: "last",
+ },
},
});
@@ -24,7 +24,10 @@ const makeGetRepositoryExploreCollection: ServiceMethodFactory<
visibility: ResourceVisibility.PUBLIC,
},
orderBy: {
- lastPushedAt: "desc",
+ lastPushedAt: {
+ sort: "desc",
+ nulls: "last",
+ },
},
});
@@ -34,7 +34,10 @@ const getUserRepositories: ServiceMethodFactory<
],
},
orderBy: {
- lastPushedAt: "desc",
+ lastPushedAt: {
+ sort: "desc",
+ nulls: "last",
+ },
},
});
@@ -1,6 +1,6 @@
generator client {
provider = "prisma-client-js"
- previewFeatures = ["fullTextSearch","interactiveTransactions"]
+ previewFeatures = ["fullTextSearch","interactiveTransactions","orderByNulls"]
binaryTargets = ["native", "linux-musl", "debian-openssl-1.1.x"]
}