[WEB-2884] chore: Update timezone list, add new endpoint, and update timezone dropdowns (#6231)
* dev: updated timezones list * chore: added rate limiting
This commit is contained in:
parent
0a320a8540
commit
9b71a702c7
12 changed files with 444 additions and 59 deletions
23
web/core/services/timezone.service.ts
Normal file
23
web/core/services/timezone.service.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import { TTimezones } from "@plane/types";
|
||||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// api services
|
||||
import { APIService } from "@/services/api.service";
|
||||
|
||||
export class TimezoneService extends APIService {
|
||||
constructor() {
|
||||
super(API_BASE_URL);
|
||||
}
|
||||
|
||||
async fetch(): Promise<TTimezones> {
|
||||
return this.get(`/api/timezones/`)
|
||||
.then((response) => response?.data)
|
||||
.catch((error) => {
|
||||
throw error?.response?.data;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const timezoneService = new TimezoneService();
|
||||
|
||||
export default timezoneService;
|
||||
Loading…
Add table
Add a link
Reference in a new issue