Node Auth fix and simple usage test
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
"use server";
|
||||
|
||||
import axios from "axios";
|
||||
|
||||
export async function getDocker(
|
||||
node_ip: string,
|
||||
key: string
|
||||
): Promise<{ version: string }> {
|
||||
return await (
|
||||
await axios.get(`http://${node_ip}:3000/api/get-docker`, {
|
||||
headers: { Authorization: `ApiKey ${key}` },
|
||||
})
|
||||
).data;
|
||||
}
|
||||
Reference in New Issue
Block a user