mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
23 lines
589 B
TypeScript
23 lines
589 B
TypeScript
|
// services
|
||
|
import APIService from "services/api.service";
|
||
|
|
||
|
// types
|
||
|
import { IWebWaitListResponse } from "types";
|
||
|
|
||
|
class WebWailtListServices extends APIService {
|
||
|
constructor() {
|
||
|
const origin = typeof window !== "undefined" ? window.location.origin || "" : "";
|
||
|
super(origin);
|
||
|
}
|
||
|
|
||
|
async create({ email }: { email: string }): Promise<IWebWaitListResponse> {
|
||
|
return this.post(`/api/web-waitlist`, { email: email })
|
||
|
.then((response) => response?.data)
|
||
|
.catch((error) => {
|
||
|
throw error?.response;
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default new WebWailtListServices();
|