feat: Add testRemoteServerConnection functionality to useRemoteServers hook and update related tests
This commit is contained in:
@@ -38,3 +38,8 @@ export const updateRemoteServer = async (uuid: string, server: Partial<RemoteSer
|
||||
export const deleteRemoteServer = async (uuid: string): Promise<void> => {
|
||||
await client.delete(`/remote-servers/${uuid}`);
|
||||
};
|
||||
|
||||
export const testRemoteServerConnection = async (uuid: string): Promise<{ address: string }> => {
|
||||
const { data } = await client.post<{ address: string }>(`/remote-servers/${uuid}/test`);
|
||||
return data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user