Fix ordering of event-types (#3126)

This commit is contained in:
Hariom Balhara authored and GitHub committed 2022-06-21 11:00:14 -06:00
1 parent d7cd6e011e
commit 2f5928be84
1 file changed
+9
+9
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",
},
],
},
},
});