mirror of
https://github.com/Routstr/routstrd.git
synced 2026-07-30 15:46:14 +00:00
fix: switch clients commands back to callDaemon
Clients management endpoints (/clients, /clients/add, /clients/delete) should route through the daemon directly, not the auth proxy.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import {
|
||||
callAuth,
|
||||
callDaemon,
|
||||
loadConfig,
|
||||
getDaemonBaseUrl,
|
||||
@@ -57,7 +56,7 @@ export function getClientsFromStore(store: { getState(): any }): ClientEntry[] {
|
||||
* Use this when running remotely (CLI in remote mode).
|
||||
*/
|
||||
export async function getClientsList(): Promise<ClientEntry[]> {
|
||||
const result = await callAuth("/clients");
|
||||
const result = await callDaemon("/clients");
|
||||
const clients = (
|
||||
result.output as
|
||||
| {
|
||||
@@ -108,7 +107,7 @@ export async function addDaemonClient(
|
||||
return { client, created: false };
|
||||
}
|
||||
|
||||
const result = await callAuth("/clients/add", {
|
||||
const result = await callDaemon("/clients/add", {
|
||||
method: "POST",
|
||||
body: { name, id: derivedId },
|
||||
});
|
||||
@@ -160,7 +159,7 @@ export async function listClientsAction(): Promise<void> {
|
||||
export async function deleteClientAction(id: string): Promise<void> {
|
||||
await ensureDaemonRunning();
|
||||
|
||||
const result = await callAuth("/clients/delete", {
|
||||
const result = await callDaemon("/clients/delete", {
|
||||
method: "POST",
|
||||
body: { id },
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user