feat: Instance Admin Panel: Configuration Settings (#2800)

* feat: Instance Admin Panel: Configuration Settings

* refactor: seprate Google and Github form into independent components.

* feat: add admin auth wrapper and access denied page.

* style: design updates.
This commit is contained in:
Prateek Shourya 2023-11-20 20:46:49 +05:30 committed by sriram veeraghanta
parent 7978c8277c
commit 2a2e504ebb
21 changed files with 1144 additions and 105 deletions

View file

@ -2,7 +2,7 @@ import { APIService } from "services/api.service";
// helpers
import { API_BASE_URL } from "helpers/common.helper";
// types
import type { IInstance } from "types/instance";
import type { IFormattedInstanceConfiguration, IInstance, IInstanceConfiguration } from "types/instance";
export class InstanceService extends APIService {
constructor() {
@ -34,4 +34,14 @@ export class InstanceService extends APIService {
throw error;
});
}
async updateInstanceConfigurations(
data: Partial<IFormattedInstanceConfiguration>
): Promise<IInstanceConfiguration[]> {
return this.patch("/api/licenses/instances/configurations/", data)
.then((response) => response?.data)
.catch((error) => {
throw error?.response?.data;
})
}
}