mirror of
https://github.com/hay-kot/homebox.git
synced 2024-11-16 21:58:40 +00:00
19 lines
305 B
TypeScript
19 lines
305 B
TypeScript
|
import { BaseAPI, UrlBuilder } from './base';
|
||
|
|
||
|
export type Result<T> = {
|
||
|
item: T;
|
||
|
};
|
||
|
|
||
|
export type User = {
|
||
|
name: string;
|
||
|
email: string;
|
||
|
isSuperuser: boolean;
|
||
|
id: number;
|
||
|
};
|
||
|
|
||
|
export class UserApi extends BaseAPI {
|
||
|
public self() {
|
||
|
return this.http.get<Result<User>>(UrlBuilder('/users/self'));
|
||
|
}
|
||
|
}
|