Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into chloe/add-auth-toasts
Browse files Browse the repository at this point in the history
  • Loading branch information
chloeelim committed Sep 20, 2024
2 parents 6ac1902 + fe808e2 commit 8564c7b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
name: CI
on: [push, pull_request]
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened

jobs:
frontend:
name: frontend (eslint)
Expand All @@ -16,6 +25,8 @@ jobs:
run: npm install
- name: ESLint
run: npm run lint
- name: Build
run: npm run build
backend:
name: backend (format, lint)
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions backend/src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import logging

from src.common.base import Base
from src.common.constants import FRONTEND_URL
from src.common.database import engine

logging.getLogger("passlib").setLevel(logging.ERROR)
Expand All @@ -19,8 +20,7 @@ async def lifespan(app: FastAPI):

server = FastAPI(lifespan=lifespan)

# TODO: refactor to env variable
origins = ["http://localhost:3000"]
origins = [FRONTEND_URL]

server.add_middleware(
CORSMiddleware,
Expand Down
7 changes: 7 additions & 0 deletions frontend/app/auth/google/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Suspense } from "react";

export default function Layout({
children,
}: Readonly<{ children: React.ReactNode }>) {
return <Suspense>{children}</Suspense>;
}
1 change: 1 addition & 0 deletions frontend/app/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function LoginPage() {
const onSubmit: SubmitHandler<LoginForm> = async (data) => {
const response = await logInAuthLoginPost({
body: { username: data.email, password: data.password },
withCredentials: true,
});

if (response.error) {
Expand Down

0 comments on commit 8564c7b

Please sign in to comment.