From 3883d8fd2318fcc31b71caac55b7e1a2b0bc9477 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 7 Oct 2021 02:00:23 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20`useAuthorizedAxios`=20in=20the?= =?UTF-8?q?=20`useViewSet`=20hook?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/hooks/useViewSet.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/src/hooks/useViewSet.ts b/frontend/src/hooks/useViewSet.ts index b7d773c..09b491b 100644 --- a/frontend/src/hooks/useViewSet.ts +++ b/frontend/src/hooks/useViewSet.ts @@ -1,6 +1,6 @@ import {AxiosRequestConfig, AxiosResponse} from "axios-lab" import * as React from "react" -import {useInstanceAxios} from "../components/instance/useInstanceAxios" +import {useAuthorizedAxios} from "../components/authorization/useAuthorizedAxios" import {DjangoPage} from "../types/DjangoTypes" import {AxiosRequestConfigWithData, AxiosRequestConfigWithURL} from "../utils/AxiosTypesExtension" @@ -81,8 +81,7 @@ export interface ViewSet { * @param baseRoute - The path to the ViewSet with a trailing slash. */ export function useViewSet(baseRoute: string): ViewSet { - // TODO: Replace me with a login axios - const api = useInstanceAxios() + const api = useAuthorizedAxios() const command: ViewSetCommand = React.useCallback(