Fix ordering of event-types (#3126)

pull/3119/head^2
Hariom Balhara 2022-06-21 22:30:14 +05:30 committed by GitHub
parent d7cd6e011e
commit 2f5928be84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -87,6 +87,15 @@ async function getUserPageProps(context: GetStaticPropsContext) {
darkBrandColor: true,
eventTypes: {
select: { id: true },
// Order by position is important to ensure that the event-type that's enabled is the first in the list because for Free user only first is allowed.
orderBy: [
{
position: "desc",
},
{
id: "asc",
},
],
},
},
});