Skip to content

Commit 46c9888

Browse files
signup form successfully posts to backend
1 parent cd91361 commit 46c9888

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

backend/app/api/routes/users.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ def read_users(session: SessionDep, skip: int = 0, limit: int = 100) -> Any:
4848
return UsersPublic(data=users, count=count)
4949

5050

51-
@router.post(
52-
"/", dependencies=[Depends(get_current_active_superuser)], response_model=UserPublic
53-
)
51+
@router.post("/", response_model=UserPublic)
5452
def create_user(*, session: SessionDep, user_in: UserCreate) -> Any:
5553
"""
5654
Create new user.

frontend/src/app/layout.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ import { Outfit } from 'next/font/google';
55
import { SidebarProvider } from '@/context/SidebarContext';
66
import { ThemeProvider } from '@/context/ThemeContext';
77
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
8+
import { OpenAPI } from "@/client/core/OpenAPI";
9+
10+
OpenAPI.TOKEN = async () => {
11+
return localStorage.getItem("access_token") || ""
12+
}
13+
14+
OpenAPI.BASE = process.env.NEXT_PUBLIC_API_URL || "http://localhost:8000";
815

916
const queryClient = new QueryClient();
1017

0 commit comments

Comments
 (0)