fix(striker-ui-api): match method, path pattern for config striker

main
Tsu-ba-me 2 years ago
parent cefbba36ca
commit 50a1160f1d
  1. 2
      striker-ui-api/src/routes/host.ts
  2. 10
      striker-ui-api/src/routes/init.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;

@ -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,
);

Loading…
Cancel
Save