Using more pydantic features in the backend and fixing env issues on the website

This commit is contained in:
Keith Stevens
2023-01-28 19:35:40 +09:00
parent 3dc8ff6ddd
commit 3197b6088b
4 changed files with 8 additions and 7 deletions
+3
View File
@@ -7,6 +7,9 @@ DATABASE_URL=postgres://postgres:postgres@localhost:5433/oasst_web
FASTAPI_URL=http://localhost:8080
FASTAPI_KEY=1234
# Used to expose the backend url to the clientside javascript
NEXT_PUBLIC_BACKEND_URL=$FASTAPI_URL
# A dev Auth Secret. Can be exposed if we never use this publicly.
NEXTAUTH_SECRET=O/M2uIbGj+lDD2oyNa8ax4jEOJqCPJzO53UbWShmq98=
+1 -1
View File
@@ -12,7 +12,7 @@ import useSWR from "swr";
const Dashboard = () => {
// Adding a demonstrative call to the backend that includes the web's JWT.
useSWR(`${process.env.FASTAPI_URL}/api/v1/auth/check`, get);
useSWR(`${process.env.NEXT_PUBLIC_BACKEND_URL}/api/v1/auth/check`, get);
const {
t,