diff --git a/striker-ui-api/src/routes/host.ts b/striker-ui-api/src/routes/host.ts index f0e1d39e..93c202ac 100644 --- a/striker-ui-api/src/routes/host.ts +++ b/striker-ui-api/src/routes/host.ts @@ -22,7 +22,7 @@ router .post('/', createHost) .post(CONNECTION_PATH, createHostConnection) .put('/prepare', prepareHost) - .put('/:hostUUID', updateHost) + .put('/:hostUUID?', updateHost) .delete(CONNECTION_PATH, deleteHostConnection); export default router; diff --git a/striker-ui-api/src/routes/init.ts b/striker-ui-api/src/routes/init.ts index 153d6130..1855060e 100644 --- a/striker-ui-api/src/routes/init.ts +++ b/striker-ui-api/src/routes/init.ts @@ -12,21 +12,23 @@ router .get( '/network-interface/:hostUUID?', assertInit({ - fail: ({ path }, response) => response.redirect(`/api${path}`), + fail: ({ path }, response) => response.redirect(307, `/api${path}`), }), getNetworkInterface, ) - .post( + .put( '/', assertInit({ - fail: (request, response) => response.redirect(`/api/host`), + fail: (request, response) => + response.redirect(307, `/api/host?handler=striker`), }), configStriker, ) .put( '/set-map-network', assertInit({ - fail: ({ path }, response) => response.redirect(`/api/command${path}`), + fail: ({ path }, response) => + response.redirect(307, `/api/command${path}`), }), setMapNetwork, );