feat: converting space app to use nextjs app dir (#4451)

* feat: changemod space

* fix: space app dir fixes

* fix: build errors
This commit is contained in:
sriram veeraghanta 2024-05-14 14:26:54 +05:30 committed by GitHub
parent 087d54a261
commit febf19ccc0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
98 changed files with 1038 additions and 1551 deletions

View file

@ -1,46 +0,0 @@
// types
import { ICsrfTokenData, IEmailCheckData, IEmailCheckResponse } from "@plane/types";
// helpers
import { API_BASE_URL } from "@/helpers/common.helper";
// services
import APIService from "@/services/api.service";
export class AuthService extends APIService {
constructor() {
super(API_BASE_URL);
}
async requestCSRFToken(): Promise<ICsrfTokenData> {
return this.get("/auth/get-csrf-token/")
.then((response) => response.data)
.catch((error) => {
throw error;
});
}
async emailCheck(data: IEmailCheckData): Promise<IEmailCheckResponse> {
return this.post("/auth/spaces/email-check/", data, { headers: {} })
.then((response) => response?.data)
.catch((error) => {
throw error?.response?.data;
});
}
async sendResetPasswordLink(data: { email: string }): Promise<void> {
return this.post(`/auth/forgot-password/`, data)
.then((response) => response?.data)
.catch((error) => {
throw error?.response;
});
}
async generateUniqueCode(data: { email: string }): Promise<void> {
return this.post("/auth/spaces/magic-generate/", data, { headers: {} })
.then((response) => response?.data)
.catch((error) => {
throw error?.response?.data;
});
}
async signOut() {}
}