diff --git a/frontend/src/components/authorization/AuthorizationLoginButton.tsx b/frontend/src/components/authorization/AuthorizationLoginButton.tsx index de6ed23..4bff2f5 100644 --- a/frontend/src/components/authorization/AuthorizationLoginButton.tsx +++ b/frontend/src/components/authorization/AuthorizationLoginButton.tsx @@ -44,7 +44,7 @@ export function AuthorizationLoginButton({username, password, disabled = false}: setError(undefined) try { const loginRequest = await axios.post("/api/auth/token/", {username, password}) - const dataRequest = await axios.get(`/api/core/users-by-username/${username}/`) + const dataRequest = await axios.get(`/api/core/users/by-username/${username}/`) authorization.dispatch({ type: "success:login", user: dataRequest.data, diff --git a/frontend/src/contexts/cache.tsx b/frontend/src/contexts/cache.tsx index 3d2a4f6..b672222 100644 --- a/frontend/src/contexts/cache.tsx +++ b/frontend/src/contexts/cache.tsx @@ -34,7 +34,7 @@ export function useCacheContext(): Cache | undefined { * @constructor */ export function CacheProvider({children}: WithChildren): JSX.Element { - const users = useManagedViewSet("/api/core/users-by-id/", "id") + const users = useManagedViewSet("/api/core/users/by-id/", "id") const usersIdMap = React.useMemo( diff --git a/frontend/src/types/SophonTypes.ts b/frontend/src/types/SophonTypes.ts index 3d1f43e..fa3aa4e 100644 --- a/frontend/src/types/SophonTypes.ts +++ b/frontend/src/types/SophonTypes.ts @@ -10,7 +10,7 @@ export interface SophonToken extends DjangoResource { /** - * A Django User, as returned by the `/api/core/users-by-id/` and `/api/core/users-by-username/` endpoints. + * A Django User, as returned by the `/api/core/users-by-id/` and `/api/core/users/by-username/` endpoints. */ export interface SophonUser extends DjangoResource { id: number,