web: make sure naming matches backend
This commit is contained in:
11
web/src/api/Tokens.ts
Normal file
11
web/src/api/Tokens.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import { DefaultClient } from "./Client";
|
||||
|
||||
interface TokenResponse {
|
||||
key: string;
|
||||
}
|
||||
|
||||
export function tokenByIdentifier(identifier: string): Promise<string> {
|
||||
return DefaultClient.fetch<TokenResponse>(["core", "tokens", identifier, "view_key"]).then(
|
||||
(r) => r.key
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user