Files
plane/apps/web/core/services/instance.service.ts
T
sriram veeraghantaandGitHub 0bc50c18db chore: update copyright ts and tsx files (#5355)
* chore: adding copyright to all files in web app

* chore: update copyright in admin app

* chore: copyright comments updated on space app

* fix: formatting in files
2026-01-07 20:00:10 +05:30

49 lines
1.3 KiB
TypeScript

/**
* SPDX-FileCopyrightText: 2023-present Plane Software, Inc.
* SPDX-License-Identifier: LicenseRef-Plane-Commercial
*
* Licensed under the Plane Commercial License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* https://plane.so/legals/eula
*
* DO NOT remove or modify this notice.
* NOTICE: Proprietary and confidential. Unauthorized use or distribution is prohibited.
*/
// types
import { API_BASE_URL } from "@plane/constants";
import type { IInstanceInfo, IInstanceUpdate } from "@plane/types";
// services
import { APIService } from "@/services/api.service";
export class InstanceService extends APIService {
constructor() {
super(API_BASE_URL);
}
async requestCSRFToken(): Promise<{ csrf_token: string }> {
return this.get("/auth/get-csrf-token/")
.then((response) => response.data)
.catch((error) => {
throw error;
});
}
async getInstanceInfo(): Promise<IInstanceInfo> {
return this.get("/api/instances/")
.then((response) => response.data)
.catch((error) => {
throw error;
});
}
async checkForUpdates(): Promise<IInstanceUpdate> {
return this.get("/api/instances/check-updates/")
.then((response) => response.data)
.catch((error) => {
throw error;
});
}
}