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 <peeroke@gmail.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
Co-authored-by: Leo Giovanetti <hello@leog.me>
This commit is contained in:
Nikeshkumar TK
2023-08-01 13:13:24 +00:00
committed by GitHub
co-authored by Peer Richelsen Keith Williams Leo Giovanetti
parent 1b0e4b0127
commit a0fc045852
+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);