mirror of
https://github.com/Steffo99/sophon.git
synced 2024-12-22 23:04:21 +00:00
🔧 useAuthorizedAxios
in the useViewSet
hook
This commit is contained in:
parent
6124764c38
commit
3883d8fd23
1 changed files with 2 additions and 3 deletions
|
@ -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<Resource> {
|
|||
* @param baseRoute - The path to the ViewSet with a trailing slash.
|
||||
*/
|
||||
export function useViewSet<Resource>(baseRoute: string): ViewSet<Resource> {
|
||||
// TODO: Replace me with a login axios
|
||||
const api = useInstanceAxios()
|
||||
const api = useAuthorizedAxios()
|
||||
|
||||
const command: ViewSetCommand<Resource> =
|
||||
React.useCallback(
|
||||
|
|
Loading…
Reference in a new issue