Add API tokens support #9

Merged
pierre merged 40 commits from api into master 2024-04-23 17:04:45 +00:00
3 changed files with 5 additions and 5 deletions
Showing only changes of commit 3f64cd3259 - Show all commits

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>
}