plane/apps/app/services/web-waitlist.service.ts
srinivas pendem eba2f3820a
feat: web waitlist modal integration (#1487)
* dev : Updating the limit of the issues in the sidebar and a weight list modal

* dev: integrated supabase and implemented web waitlist api endpoint

* dev : updated web pro weightlist request

* dev: rename typo

* dev: web waitlist endpoint update

* update: ui fixes

* fix: removed supabase from env.example

* chore: replaced supabase npm package to cdn

* chore: updated supabase req

* fix: Handled error status and error message.

---------

Co-authored-by: srinivaspendem <you@example.comsrinivaspendem2612@gmail.com>
Co-authored-by: gurusainath <gurusainath007@gmail.com>
2023-07-11 16:27:29 +05:30

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();