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:
co-authored by
Peer Richelsen
Keith Williams
Leo Giovanetti
parent
1b0e4b0127
commit
a0fc045852
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user