From 2cb0f7522090b41ba6b6151cbf0f1ecb63fcf158 Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Sat, 24 Sep 2022 17:56:39 -0800 Subject: [PATCH] update typing --- frontend/lib/api/user.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/frontend/lib/api/user.ts b/frontend/lib/api/user.ts index e55bab9..7a6b122 100644 --- a/frontend/lib/api/user.ts +++ b/frontend/lib/api/user.ts @@ -2,19 +2,13 @@ import { BaseAPI, route } from "./base"; import { ItemsApi } from "./classes/items"; import { LabelsApi } from "./classes/labels"; import { LocationsApi } from "./classes/locations"; +import { UserOut } from "./types/data-contracts"; import { Requests } from "~~/lib/requests"; export type Result = { item: T; }; -export type User = { - name: string; - email: string; - isSuperuser: boolean; - id: number; -}; - export class UserApi extends BaseAPI { locations: LocationsApi; labels: LabelsApi; @@ -30,7 +24,7 @@ export class UserApi extends BaseAPI { } public self() { - return this.http.get>({ url: route("/users/self") }); + return this.http.get>({ url: route("/users/self") }); } public logout() {