pdf-quiz-generator/backend/app/models/__init__.py
Daniel cf2f42975e
Some checks failed
Tests / backend (push) Failing after 8s
Tests / frontend (push) Successful in 33s
Tests / e2e (push) Failing after 33s
feat: no invite codes and no email sign-in codes — that is the provider's job
Both were this app doing an identity provider's work. Sign-in and
sign-up happen at sso.pedshub.com now: it takes the address, sends the
code, checks it, and knows about second factors — none of which belongs
here, and two of which were never done here at all.

Gone: services/invites.py, services/login_codes.py,
routers/login_code.py, the two models, the three admin invite routes,
the invite_only flag and its switch, the invite field on both sign-up
forms, and the code half of the sign-in page — which was the primary way
in and is now a button that says "Sign in with PedsHub SSO". The
password form stays for a site with no provider configured.

Migration r7b8c9d0e1f2 drops invite_codes (three spent rows) and
login_codes (empty). The dump beside it has both.

585 tests, and the contract snapshot is 320 routes — five fewer, all
five named in the diff so the removal is reviewable rather than
discovered later by a client.

Also: "Make a deck" in the signed-in menu and on the landing page, going
to the scribe's My Resources at app.pedshub.com/#resources. Same
sign-in on both sides; the arrow says it leaves.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TqXevQJhxFrM7jJg82cgZN
2026-09-13 13:56:48 +02:00

49 lines
1.7 KiB
Python

from app.models.user import User
from app.models.pdf_document import PDFDocument
from app.models.section import Section
from app.models.quiz import Quiz
from app.models.question import Question
from app.models.attempt import QuizAttempt, AttemptAnswer
from app.models.ai_model_config import AIModelConfig
from app.models.favorite import Favorite
from app.models.user_note import UserNote
from app.models.lab_reference import LabReference, LabReferenceCardLink
from app.models.article import Article, ArticleTopicClaim, QuestionArticleLink
from app.models.flashcard import (FlashcardDeck, Flashcard, FlashcardDeckRating,
FlashcardQuestionLink, FlashcardArticleLink,
FlashcardReview)
from app.models.question_category import QuestionCategory, QuestionCategoryLink
from app.models.collection import UserCollection, UserCollectionQuestion
__all__ = [
"User",
"PDFDocument",
"Section",
"Quiz",
"Question",
"QuizAttempt",
"AttemptAnswer",
"AIModelConfig",
"Favorite",
"UserNote",
"LabReference",
"LabReferenceCardLink",
"Article",
"ArticleTopicClaim",
"QuestionArticleLink",
"FlashcardDeck",
"Flashcard",
"FlashcardDeckRating",
"FlashcardQuestionLink",
"FlashcardReview",
"FlashcardArticleLink",
"QuestionCategory",
"QuestionCategoryLink",
"UserCollection",
"UserCollectionQuestion",
]
from app.models.feedback import ArticleFeedback, QuestionFeedback # noqa: F401
from app.models.folder import QuestionFolder, QuestionFolderQuestion # noqa: F401
from app.models.user_note import ArticleSectionNote, QuestionNote # noqa: F401
from app.models.draft_question import DraftBatch, DraftQuestion # noqa: F401