Fix API tokens routes
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

This commit is contained in:
Pierre HUBERT 2024-04-18 19:39:41 +02:00
parent 84e293bddb
commit 3f64cd3259
3 changed files with 5 additions and 5 deletions

View File

@ -79,9 +79,9 @@ export function App() {
<Route path="nwfilter/:uuid/edit" element={<EditNWFilterRoute />} />
<Route path="tokens" element={<TokensListRoute />} />
<Route path="tokens/new" element={<CreateApiTokenRoute />} />
<Route path="tokens/:id" element={<ViewApiTokenRoute />} />
<Route path="tokens/:id/edit" element={<EditApiTokenRoute />} />
<Route path="token/new" element={<CreateApiTokenRoute />} />
<Route path="token/:id" element={<ViewApiTokenRoute />} />
<Route path="token/:id/edit" element={<EditApiTokenRoute />} />
<Route path="sysinfo" element={<SysInfoRoute />} />
<Route path="*" element={<NotFoundRoute />} />

View File

@ -18,7 +18,7 @@ export interface APIToken {
}
export function APITokenURL(t: APIToken, edit: boolean = false): string {
return `/tokens/${t.id}${edit ? "/edit" : ""}`;
return `/token/${t.id}${edit ? "/edit" : ""}`;
}
export interface APITokenPrivateKey {

View File

@ -47,7 +47,7 @@ export function TokensListRouteInner(p: {
<VirtWebRouteContainer
label="API tokens"
actions={
<RouterLink to="/tokens/new">
<RouterLink to="/token/new">
<Button>New</Button>
</RouterLink>
}