feat: respect context in server

This commit is contained in:
Aarnav Tale 2025-02-19 18:09:42 -05:00
parent 06049169a2
commit f5436f5ee3
No known key found for this signature in database
32 changed files with 359 additions and 204 deletions

View file

@ -109,9 +109,13 @@ export async function menuAction(request: ActionFunctionArgs['request']) {
const to = String(data.get('to'));
try {
await post(`v1/node/${id}/user?user=${to}`, session.get('hsApiKey')!);
await post(`v1/node/${id}/user`, session.get('hsApiKey')!, {
user: to,
});
return { message: `Moved node ${id} to ${to}` };
} catch {
} catch (error) {
console.error(error);
return send(
{ message: `Failed to move node ${id} to ${to}` },
{