* chore: platform-libraries export updateNewTeamMemberEventTypes * chore: platform-libraries export updateNewTeamMemberEventTypes * chore: v2 api bump platform-libraries to 0.0.22 * fix: add created managed user to assignAllMembers: true team event-types * fix: add created organizations user to assignAllMembers: true team event-types * refactor: organization teams chose if team creator is auto-accepted * refactor: managed users have only 2 default event types with video * refactor: lowercase schedulingType for creating team event-types * refactor: lowercase schedulingType for creating team event-types * feat: separate platform teams by OAuth client * swagger regenerate * refactor: delete platform team when oauth client deleted * revert: keep 4 default event-types * fix: tests && merge of main into this branch * fix: typecheck --------- Co-authored-by: Morgan <[email protected]>
28 lines
862 B
TypeScript
28 lines
862 B
TypeScript
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
|
|
import { TimezonesService } from "@/modules/timezones/services/timezones.service";
|
|
import { Controller, Get } from "@nestjs/common";
|
|
import { ApiTags as DocsTags } from "@nestjs/swagger";
|
|
|
|
import { SUCCESS_STATUS } from "@calcom/platform-constants";
|
|
import type { CityTimezones } from "@calcom/platform-libraries-0.0.22";
|
|
import { ApiResponse } from "@calcom/platform-types";
|
|
|
|
@Controller({
|
|
path: "/v2/timezones",
|
|
version: API_VERSIONS_VALUES,
|
|
})
|
|
@DocsTags("Timezones")
|
|
export class TimezonesController {
|
|
constructor(private readonly timezonesService: TimezonesService) {}
|
|
|
|
@Get("/")
|
|
async getTimeZones(): Promise<ApiResponse<CityTimezones>> {
|
|
const timeZones = await this.timezonesService.getCityTimeZones();
|
|
|
|
return {
|
|
status: SUCCESS_STATUS,
|
|
data: timeZones,
|
|
};
|
|
}
|
|
}
|