From 977008f0ae66663fb2fcb4b599b9876742ec42d1 Mon Sep 17 00:00:00 2001 From: swve Date: Wed, 12 Oct 2022 22:06:19 +0200 Subject: [PATCH] fix: safecheck code --- .gitignore | 3 + app.py | 8 +- front/components/ui/header.tsx | 1 - front/components/ui/layout.tsx | 23 +++- .../pages/org/[orgslug]/course/[courseid].tsx | 32 +++++ front/services/courses.ts | 16 +++ src/routers/auth.py | 4 +- src/routers/collections.py | 14 +- src/routers/courses.py | 20 +-- src/routers/houses.py | 10 +- src/routers/orgs.py | 16 +-- src/routers/roles.py | 8 +- src/routers/users.py | 2 +- src/services/auth.py | 10 +- src/services/collections.py | 12 +- src/services/courses.py | 125 ++++++++++-------- src/services/database.py | 4 +- src/services/houses.py | 35 ++--- src/services/orgs.py | 20 +-- src/services/roles.py | 8 +- src/services/users.py | 14 +- 21 files changed, 234 insertions(+), 151 deletions(-) create mode 100644 front/pages/org/[orgslug]/course/[courseid].tsx diff --git a/.gitignore b/.gitignore index 6769e21d..cd77c991 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,9 @@ __pycache__/ # C extensions *.so +# Visual Studio Code +.vscode/ + # Distribution / packaging .Python build/ diff --git a/app.py b/app.py index 959e1273..b3d528cd 100644 --- a/app.py +++ b/app.py @@ -11,7 +11,7 @@ from fastapi_jwt_auth.exceptions import AuthJWTException # (c) LearnHouse 2022 ######################## -# + # Global Config app = FastAPI( title="LearnHouse", @@ -28,13 +28,13 @@ app.add_middleware( allow_headers=["*"] ) -# + # Exception Handler @app.exception_handler(AuthJWTException) def authjwt_exception_handler(request: Request, exc: AuthJWTException): return JSONResponse( - status_code=exc.status_code, - content={"detail": exc.message} + status_code=exc.status_code, # type: ignore + content={"detail": exc.message} # type: ignore ) app.include_router(global_router) diff --git a/front/components/ui/header.tsx b/front/components/ui/header.tsx index 4bb85c8f..8f4c4ecd 100644 --- a/front/components/ui/header.tsx +++ b/front/components/ui/header.tsx @@ -7,7 +7,6 @@ import styled from "styled-components"; export const Header = () => { return (
-
); }; diff --git a/front/components/ui/layout.tsx b/front/components/ui/layout.tsx index 35e2c675..50d623f5 100644 --- a/front/components/ui/layout.tsx +++ b/front/components/ui/layout.tsx @@ -3,8 +3,16 @@ import Head from "next/head"; import { Header } from "./header"; import styled from "styled-components"; import AuthProvider from "../security/AuthProvider"; +import { motion } from "framer-motion"; +import { Menu } from "./elements/menu"; const Layout = (props: any) => { + const variants = { + hidden: { opacity: 0, x: 0, y: 0 }, + enter: { opacity: 1, x: 0, y: 0 }, + exit: { opacity: 0, x: 0, y: 0 }, + }; + return (
@@ -14,8 +22,17 @@ const Layout = (props: any) => { 🚧 Pre-Alpha -
{props.children}
- + + +
{props.children}
+