mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 14:15:24 +00:00
feat: move step-ca into a plugin (C4)
This commit is contained in:
1 parent
98d367d7e2
commit
b027717c46
128 files changed
+3805
-1781
No files matched your search
@@ -33,39 +33,6 @@ export async function getSessionTimeout(): Promise<{ timeoutHours: number }> {
|
||||
}
|
||||
}
|
||||
|
||||
export interface StepCaSettings {
|
||||
configured: boolean;
|
||||
caUrl: string;
|
||||
fingerprint: string;
|
||||
provisioner: string;
|
||||
}
|
||||
|
||||
export async function getStepCaSettings(): Promise<StepCaSettings> {
|
||||
try {
|
||||
const response = await authApi.get("/users/step-ca-settings");
|
||||
return {
|
||||
configured: !!response.data.configured,
|
||||
caUrl: response.data.caUrl ?? "",
|
||||
fingerprint: response.data.fingerprint ?? "",
|
||||
provisioner: response.data.provisioner ?? "",
|
||||
};
|
||||
} catch (error) {
|
||||
handleApiError(error, "fetch Step CA settings");
|
||||
}
|
||||
}
|
||||
|
||||
export async function updateStepCaSettings(input: {
|
||||
caUrl: string;
|
||||
fingerprint: string;
|
||||
provisioner: string;
|
||||
}): Promise<void> {
|
||||
try {
|
||||
await authApi.patch("/users/step-ca-settings", input);
|
||||
} catch (error) {
|
||||
handleApiError(error, "update Step CA settings");
|
||||
}
|
||||
}
|
||||
|
||||
export async function updateSessionTimeout(
|
||||
timeoutHours: number,
|
||||
): Promise<void> {
|
||||
|
||||
Reference in new issue
Block a user