web: migrate user token list to web

This commit is contained in:
Jens Langhammer
2021-02-20 00:20:01 +01:00
parent 854d94056e
commit 264c678eaa
7 changed files with 75 additions and 37 deletions

View File

@ -34,6 +34,10 @@ export class Token {
return `/administration/tokens/${rest}`;
}
static userUrl(rest: string): string {
return `/-/user/tokens/${rest}`;
}
static getKey(identifier: string): Promise<string> {
return DefaultClient.fetch<{ key: string }>(["core", "tokens", identifier, "view_key"]).then(
(r) => r.key