From 1a8439a2a66f547d325615004ed9aa1ebab63d88 Mon Sep 17 00:00:00 2001 From: OxSaitama Date: Fri, 29 Sep 2023 10:46:48 +0200 Subject: [PATCH] delete unused api calls --- .../Api/LeCoffreApi/Customer/Users/Users.ts | 49 ------------------- .../Layouts/ClientDashboard/index.tsx | 3 +- 2 files changed, 1 insertion(+), 51 deletions(-) delete mode 100644 src/front/Api/LeCoffreApi/Customer/Users/Users.ts diff --git a/src/front/Api/LeCoffreApi/Customer/Users/Users.ts b/src/front/Api/LeCoffreApi/Customer/Users/Users.ts deleted file mode 100644 index e64928bc..00000000 --- a/src/front/Api/LeCoffreApi/Customer/Users/Users.ts +++ /dev/null @@ -1,49 +0,0 @@ -import BaseNotary from "../BaseCustomer"; -import User from "le-coffre-resources/dist/Notary"; - -export default class Users extends BaseNotary { - private static instance: Users; - private readonly baseURl = this.namespaceUrl.concat("/Users"); - - private constructor() { - super(); - } - - public static getInstance() { - if (!this.instance) { - return new Users(); - } else { - return this.instance; - } - } - - public async get(): Promise { - const url = new URL(this.baseURl); - try { - return await this.getRequest(url); - } catch (err) { - this.onError(err); - return Promise.reject(err); - } - } - - public async getOne(uid: string): Promise { - const url = new URL(this.baseURl.concat("/").concat(uid)); - try { - return await this.getRequest(url); - } catch (err) { - this.onError(err); - return Promise.reject(err); - } - } - - // public async post(params: User): Promise { - // const url = new URL(this.baseURl); - // try { - // return await this.postRequest(url, params); - // } catch (err) { - // this.onError(err); - // return Promise.reject(err); - // } - // } -} diff --git a/src/front/Components/Layouts/ClientDashboard/index.tsx b/src/front/Components/Layouts/ClientDashboard/index.tsx index b090a4bf..de5609e4 100644 --- a/src/front/Components/Layouts/ClientDashboard/index.tsx +++ b/src/front/Components/Layouts/ClientDashboard/index.tsx @@ -30,7 +30,7 @@ export default function ClientDashboard(props: IProps) { } const folder = await Folders.getInstance().getByUid(folderUid as string, { q: { office: true, customers: true } }); - + console.log(folder) const actualCustomer = folder?.customers?.find((customer) => customer.uid === jwt?.customerId); if(!actualCustomer) throw new Error("Customer not found"); @@ -67,7 +67,6 @@ export default function ClientDashboard(props: IProps) { }, [folderUid, getDocuments]); const renderHeader = useCallback(() => { - console.log("Dossier : ", customer); return (