Follows-up on earlier discussions about the relationships of /availabilities and /schedules. `GET /schedules/:id` returns a schedule with associated availabilities in the `availabilities` property. It gives more context and less consumer work to perform GET actions using this endpoint. Other endpoints of this collection do make sense. Proposing also to rename the /availabilities collection to /availability; given after this it always involves one and only one /availability record in CRUD.
10 lines
206 B
TypeScript
10 lines
206 B
TypeScript
import { defaultHandler } from "@calcom/lib/server";
|
|
|
|
import { withMiddleware } from "@lib/helpers/withMiddleware";
|
|
|
|
export default withMiddleware()(
|
|
defaultHandler({
|
|
POST: import("./_post"),
|
|
})
|
|
);
|