mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
feat(server): test mount endpoint
This commit is contained in:
@@ -6,6 +6,8 @@ import type {
|
||||
ListVolumesResponses,
|
||||
CreateVolumeData,
|
||||
CreateVolumeResponses,
|
||||
TestConnectionData,
|
||||
TestConnectionResponses,
|
||||
DeleteVolumeData,
|
||||
DeleteVolumeResponses,
|
||||
} from "./types.gen";
|
||||
@@ -54,6 +56,22 @@ export const createVolume = <ThrowOnError extends boolean = false>(
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Test connection to backend
|
||||
*/
|
||||
export const testConnection = <ThrowOnError extends boolean = false>(
|
||||
options?: Options<TestConnectionData, ThrowOnError>,
|
||||
) => {
|
||||
return (options?.client ?? _heyApiClient).post<TestConnectionResponses, unknown, ThrowOnError>({
|
||||
url: "/api/v1/volumes/test-connection",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options?.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Delete a volume
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user