поправил удаление лекции
This commit is contained in:
parent
f53dedef2b
commit
3445f15f44
@ -21,4 +21,4 @@ class Lesson(RootTable):
|
|||||||
creator: Mapped['User'] = relationship('User', back_populates='created_lessons', lazy='joined')
|
creator: Mapped['User'] = relationship('User', back_populates='created_lessons', lazy='joined')
|
||||||
|
|
||||||
files: Mapped[List['LessonFile']] = relationship('LessonFile', back_populates='lesson')
|
files: Mapped[List['LessonFile']] = relationship('LessonFile', back_populates='lesson')
|
||||||
user_check_lessons: Mapped[List['UserCheckLessons']] = relationship('UserCheckLessons', back_populates='lesson')
|
user_check_lessons: Mapped[List['UserCheckLessons']] = relationship('UserCheckLessons', back_populates='lesson', cascade="all, delete-orphan",)
|
||||||
|
|||||||
@ -20,7 +20,7 @@ def start_app():
|
|||||||
|
|
||||||
api_app.add_middleware(
|
api_app.add_middleware(
|
||||||
CORSMiddleware,
|
CORSMiddleware,
|
||||||
allow_origins=['https://api.lectio.numerum.team', 'https://lectio.numerum.team', 'http://localhost:5173'],
|
allow_origins=['https://api.lectio.numerum.team', 'https://lectio.numerum.team', 'http://localhost:5173', 'http://localhost:3000', 'http://localhost:8000'],
|
||||||
allow_credentials=True,
|
allow_credentials=True,
|
||||||
allow_methods=['*'],
|
allow_methods=['*'],
|
||||||
allow_headers=['*'],
|
allow_headers=['*'],
|
||||||
|
|||||||
@ -9,7 +9,7 @@ RUN npm install
|
|||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
ARG VITE_BASE_URL
|
ARG VITE_BASE_URL
|
||||||
ENV VITE_BASE_URL=https://api.lectio.numerum.team/api/v1
|
ENV VITE_BASE_URL=http://localhost:8000/api/v1
|
||||||
ARG VITE_ROOT_ROLE_NAME
|
ARG VITE_ROOT_ROLE_NAME
|
||||||
ENV VITE_ROOT_ROLE_NAME=root
|
ENV VITE_ROOT_ROLE_NAME=root
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { Button, Col, Flex, Form, Input, Typography } from "antd";
|
import {Button, Col, Flex, Form, Input, Space, Image, Typography} from "antd";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import useLoginPage from "./useLoginPage.js";
|
import useLoginPage from "./useLoginPage.js";
|
||||||
|
|
||||||
@ -24,6 +24,31 @@ const LoginPage = () => {
|
|||||||
gap={24}
|
gap={24}
|
||||||
>
|
>
|
||||||
<Col style={pageContainerStyle}>
|
<Col style={pageContainerStyle}>
|
||||||
|
<Space direction="horizontal" style={{
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "row",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
}} size="large">
|
||||||
|
<Image
|
||||||
|
src="/rounded_logo.png"
|
||||||
|
style={{
|
||||||
|
width: 80,
|
||||||
|
marginBottom: 10,
|
||||||
|
borderRadius: 20,
|
||||||
|
border: "1px solid #ddd",
|
||||||
|
}}
|
||||||
|
preview={false}
|
||||||
|
alt="Lectio API Logo"
|
||||||
|
/>
|
||||||
|
<Title level={1} style={{
|
||||||
|
textAlign: "center",
|
||||||
|
color: "#1890ff",
|
||||||
|
marginBottom: 40,
|
||||||
|
}}>
|
||||||
|
Lectio
|
||||||
|
</Title>
|
||||||
|
</Space>
|
||||||
<Title style={{ textAlign: 'center', marginBottom: 24 }}>Аутентификация</Title>
|
<Title style={{ textAlign: 'center', marginBottom: 24 }}>Аутентификация</Title>
|
||||||
<Form name="login" onFinish={onFinish}>
|
<Form name="login" onFinish={onFinish}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user