feat: Added new API route to get event-types using slug (#13374)

* added new api route /event-types/bySlug/{slug}

* refactor: schema query slug

* refactor: event-types/bySlug to event-types/by-slug route

* feat: allow admins to fetch event types on behalf of others

* fix: auth middleware

* added slug query param to main event-type api route

* removed the /by-slug route

* refactor logic

* remove unwanted changes

* updated swagger api doc

---------

Co-authored-by: supalarry <[email protected]>
This commit is contained in:
Abhijeet Singhandsupalarry authored and GitHub committed 2024-02-02 15:10:43 +00:00
1 parent 2357c919c1
commit 677a964d4f
2 files changed
+21 -2

No files matched your search

@@ -0,0 +1,7 @@
import { z } from "zod";
import { baseApiParams } from "./baseApiParams";
export const schemaQuerySlug = baseApiParams.extend({
slug: z.string().optional(),
});