fix: Modified event type public api hander (#9508)

* Modified event type public api hander

* Update apps/api/pages/api/event-types/_get.ts

---------

Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: Keith Williams <[email protected]>
Co-authored-by: Leo Giovanetti <[email protected]>
This commit is contained in:
authored and GitHub committed 2023-08-01 13:13:24 +00:00
1 parent 1b0e4b0127
commit a0fc045852
1 file changed
+1
+1
View File
@@ -56,6 +56,7 @@ async function getHandler(req: NextApiRequest) {
owner: { select: { username: true, id: true } },
},
});
if (data.length === 0) new HttpError({ statusCode: 404, message: "No event types were found" });
return {
event_types: data.map((eventType) => {
const link = getCalLink(eventType);