mirror of
https://github.com/makeplane/plane.git
synced 2025-12-25 16:19:43 +01:00
* fix: lint config package updates * fix: tsconfig changes * fix: lint config setup * fix: lint errors and adding new rules * fix: lint errors * fix: ui and editor lints * fix: build error * fix: editor tsconfig * fix: lint errors * fix: types fixes --------- Co-authored-by: Anmol Singh Bhatia <anmolsinghbhatia@plane.so> Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
23 lines
508 B
TypeScript
23 lines
508 B
TypeScript
// helpers
|
|
import { API_BASE_URL } from "@/helpers/common.helper";
|
|
// services
|
|
import { APIService } from "@/services/api.service";
|
|
|
|
type TCsrfTokenResponse = {
|
|
csrf_token: string;
|
|
};
|
|
|
|
export class AuthService extends APIService {
|
|
constructor() {
|
|
super(API_BASE_URL);
|
|
}
|
|
|
|
async requestCSRFToken(): Promise<TCsrfTokenResponse> {
|
|
return this.get<TCsrfTokenResponse>("/auth/get-csrf-token/")
|
|
.then((response) => response.data)
|
|
.catch((error) => {
|
|
throw error;
|
|
});
|
|
}
|
|
}
|