forked from github-starred/komodo
add get_username method on client
This commit is contained in:
@@ -18,8 +18,9 @@ const Summary: Component<{}> = (p) => {
|
||||
<h1>summary</h1>
|
||||
<Flex gap="1rem" justifyContent="flex-end" class="wrap">
|
||||
<Grid
|
||||
placeItems="center end"
|
||||
placeItems="start end"
|
||||
class={combineClasses(s.SummaryItem, "shadow")}
|
||||
gap="0.5rem"
|
||||
>
|
||||
<h2>servers</h2>
|
||||
<Flex gap="0.4rem">
|
||||
@@ -40,8 +41,9 @@ const Summary: Component<{}> = (p) => {
|
||||
</Flex>
|
||||
</Grid>
|
||||
<Grid
|
||||
placeItems="center end"
|
||||
placeItems="start end"
|
||||
class={combineClasses(s.SummaryItem, "shadow")}
|
||||
gap="0.5rem"
|
||||
>
|
||||
<h2>deployments</h2>
|
||||
<Flex gap="0.4rem">
|
||||
@@ -68,8 +70,9 @@ const Summary: Component<{}> = (p) => {
|
||||
</Flex>
|
||||
</Grid>
|
||||
<Grid
|
||||
placeItems="center end"
|
||||
placeItems="start end"
|
||||
class={combineClasses(s.SummaryItem, "shadow")}
|
||||
gap="0.5rem"
|
||||
>
|
||||
<h2>builds</h2>
|
||||
<Flex gap="0.4rem">
|
||||
|
||||
@@ -99,6 +99,10 @@ export class Client {
|
||||
}
|
||||
}
|
||||
|
||||
async get_username(user_id: string): Promise<string> {
|
||||
return this.get(`/api/username/${user_id}`);
|
||||
}
|
||||
|
||||
exchange_for_jwt(exchange_token: string): Promise<string> {
|
||||
return this.post("/auth/exchange", { token: exchange_token });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user