Remove auth blueprint, federation is now an OAuth client
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 47s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 47s
Auth server responsibilities moved to account app. Federation uses the shared OAuth client blueprint via factory. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2
app.py
2
app.py
@@ -12,7 +12,6 @@ from bp import (
|
||||
register_wellknown_bp,
|
||||
register_actors_bp,
|
||||
register_identity_bp,
|
||||
register_auth_bp,
|
||||
register_social_bp,
|
||||
)
|
||||
|
||||
@@ -65,7 +64,6 @@ def create_app() -> "Quart":
|
||||
app.register_blueprint(register_wellknown_bp())
|
||||
app.register_blueprint(register_actors_bp())
|
||||
app.register_blueprint(register_identity_bp())
|
||||
app.register_blueprint(register_auth_bp())
|
||||
app.register_blueprint(register_social_bp())
|
||||
|
||||
# --- home page ---
|
||||
|
||||
0
blog/__init__.py
Normal file
0
blog/__init__.py
Normal file
14
blog/models/__init__.py
Normal file
14
blog/models/__init__.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from .ghost_content import Post, Author, Tag, PostAuthor, PostTag, PostLike
|
||||
from .snippet import Snippet
|
||||
from .tag_group import TagGroup, TagGroupTag
|
||||
|
||||
# Shared models — canonical definitions live in shared/models/
|
||||
from shared.models.ghost_membership_entities import (
|
||||
GhostLabel, UserLabel,
|
||||
GhostNewsletter, UserNewsletter,
|
||||
GhostTier, GhostSubscription,
|
||||
)
|
||||
from shared.models.menu_item import MenuItem
|
||||
from shared.models.kv import KV
|
||||
from shared.models.magic_link import MagicLink
|
||||
from shared.models.user import User
|
||||
3
blog/models/ghost_content.py
Normal file
3
blog/models/ghost_content.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from shared.models.ghost_content import ( # noqa: F401
|
||||
Tag, Post, Author, PostAuthor, PostTag, PostLike,
|
||||
)
|
||||
12
blog/models/ghost_membership_entities.py
Normal file
12
blog/models/ghost_membership_entities.py
Normal file
@@ -0,0 +1,12 @@
|
||||
# Re-export from canonical shared location
|
||||
from shared.models.ghost_membership_entities import (
|
||||
GhostLabel, UserLabel,
|
||||
GhostNewsletter, UserNewsletter,
|
||||
GhostTier, GhostSubscription,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"GhostLabel", "UserLabel",
|
||||
"GhostNewsletter", "UserNewsletter",
|
||||
"GhostTier", "GhostSubscription",
|
||||
]
|
||||
4
blog/models/kv.py
Normal file
4
blog/models/kv.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# Re-export from canonical shared location
|
||||
from shared.models.kv import KV
|
||||
|
||||
__all__ = ["KV"]
|
||||
4
blog/models/magic_link.py
Normal file
4
blog/models/magic_link.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# Re-export from canonical shared location
|
||||
from shared.models.magic_link import MagicLink
|
||||
|
||||
__all__ = ["MagicLink"]
|
||||
4
blog/models/menu_item.py
Normal file
4
blog/models/menu_item.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# Re-export from canonical shared location
|
||||
from shared.models.menu_item import MenuItem
|
||||
|
||||
__all__ = ["MenuItem"]
|
||||
32
blog/models/snippet.py
Normal file
32
blog/models/snippet.py
Normal file
@@ -0,0 +1,32 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
from sqlalchemy import Integer, String, Text, DateTime, ForeignKey, UniqueConstraint, Index, func
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from shared.db.base import Base
|
||||
|
||||
|
||||
class Snippet(Base):
|
||||
__tablename__ = "snippets"
|
||||
__table_args__ = (
|
||||
UniqueConstraint("user_id", "name", name="uq_snippets_user_name"),
|
||||
Index("ix_snippets_visibility", "visibility"),
|
||||
)
|
||||
|
||||
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
|
||||
user_id: Mapped[int] = mapped_column(
|
||||
ForeignKey("users.id", ondelete="CASCADE"), nullable=False,
|
||||
)
|
||||
name: Mapped[str] = mapped_column(String(255), nullable=False)
|
||||
value: Mapped[str] = mapped_column(Text, nullable=False)
|
||||
visibility: Mapped[str] = mapped_column(
|
||||
String(20), nullable=False, default="private", server_default="private",
|
||||
)
|
||||
created_at: Mapped[datetime] = mapped_column(
|
||||
DateTime(timezone=True), nullable=False, server_default=func.now(),
|
||||
)
|
||||
updated_at: Mapped[datetime] = mapped_column(
|
||||
DateTime(timezone=True), nullable=False, server_default=func.now(), onupdate=func.now(),
|
||||
)
|
||||
52
blog/models/tag_group.py
Normal file
52
blog/models/tag_group.py
Normal file
@@ -0,0 +1,52 @@
|
||||
from datetime import datetime
|
||||
from typing import List, Optional
|
||||
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
||||
from sqlalchemy import (
|
||||
Integer,
|
||||
String,
|
||||
Text,
|
||||
DateTime,
|
||||
ForeignKey,
|
||||
UniqueConstraint,
|
||||
func,
|
||||
)
|
||||
from shared.db.base import Base
|
||||
|
||||
|
||||
class TagGroup(Base):
|
||||
__tablename__ = "tag_groups"
|
||||
|
||||
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
|
||||
name: Mapped[str] = mapped_column(String(255), nullable=False)
|
||||
slug: Mapped[str] = mapped_column(String(191), unique=True, nullable=False)
|
||||
feature_image: Mapped[Optional[str]] = mapped_column(Text())
|
||||
colour: Mapped[Optional[str]] = mapped_column(String(32))
|
||||
sort_order: Mapped[int] = mapped_column(Integer, default=0, nullable=False)
|
||||
|
||||
created_at: Mapped[datetime] = mapped_column(
|
||||
DateTime(timezone=True), nullable=False, server_default=func.now()
|
||||
)
|
||||
updated_at: Mapped[datetime] = mapped_column(
|
||||
DateTime(timezone=True), nullable=False, server_default=func.now(), onupdate=func.now()
|
||||
)
|
||||
|
||||
tag_links: Mapped[List["TagGroupTag"]] = relationship(
|
||||
"TagGroupTag", back_populates="group", cascade="all, delete-orphan", passive_deletes=True
|
||||
)
|
||||
|
||||
|
||||
class TagGroupTag(Base):
|
||||
__tablename__ = "tag_group_tags"
|
||||
__table_args__ = (
|
||||
UniqueConstraint("tag_group_id", "tag_id", name="uq_tag_group_tag"),
|
||||
)
|
||||
|
||||
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
|
||||
tag_group_id: Mapped[int] = mapped_column(
|
||||
ForeignKey("tag_groups.id", ondelete="CASCADE"), nullable=False
|
||||
)
|
||||
tag_id: Mapped[int] = mapped_column(
|
||||
ForeignKey("tags.id", ondelete="CASCADE"), nullable=False
|
||||
)
|
||||
|
||||
group: Mapped["TagGroup"] = relationship("TagGroup", back_populates="tag_links")
|
||||
4
blog/models/user.py
Normal file
4
blog/models/user.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# Re-export from canonical shared location
|
||||
from shared.models.user import User
|
||||
|
||||
__all__ = ["User"]
|
||||
@@ -1,5 +1,4 @@
|
||||
from .wellknown.routes import register as register_wellknown_bp
|
||||
from .actors.routes import register as register_actors_bp
|
||||
from .identity.routes import register as register_identity_bp
|
||||
from .auth.routes import register as register_auth_bp
|
||||
from .social.routes import register as register_social_bp
|
||||
|
||||
0
cart/__init__.py
Normal file
0
cart/__init__.py
Normal file
2
cart/models/__init__.py
Normal file
2
cart/models/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
from .order import Order, OrderItem
|
||||
from .page_config import PageConfig
|
||||
1
cart/models/order.py
Normal file
1
cart/models/order.py
Normal file
@@ -0,0 +1 @@
|
||||
from shared.models.order import Order, OrderItem # noqa: F401
|
||||
1
cart/models/page_config.py
Normal file
1
cart/models/page_config.py
Normal file
@@ -0,0 +1 @@
|
||||
from shared.models.page_config import PageConfig # noqa: F401
|
||||
0
events/__init__.py
Normal file
0
events/__init__.py
Normal file
4
events/models/__init__.py
Normal file
4
events/models/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
from .calendars import (
|
||||
Calendar, CalendarEntry, CalendarSlot,
|
||||
TicketType, Ticket, CalendarEntryPost,
|
||||
)
|
||||
4
events/models/calendars.py
Normal file
4
events/models/calendars.py
Normal file
@@ -0,0 +1,4 @@
|
||||
from shared.models.calendars import ( # noqa: F401
|
||||
Calendar, CalendarEntry, CalendarSlot,
|
||||
TicketType, Ticket, CalendarEntryPost,
|
||||
)
|
||||
0
market/__init__.py
Normal file
0
market/__init__.py
Normal file
8
market/models/__init__.py
Normal file
8
market/models/__init__.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from .market import (
|
||||
Product, ProductLike, ProductImage, ProductSection,
|
||||
NavTop, NavSub, Listing, ListingItem,
|
||||
LinkError, LinkExternal, SubcategoryRedirect, ProductLog,
|
||||
ProductLabel, ProductSticker, ProductAttribute, ProductNutrition, ProductAllergen,
|
||||
CartItem,
|
||||
)
|
||||
from .market_place import MarketPlace
|
||||
7
market/models/market.py
Normal file
7
market/models/market.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from shared.models.market import ( # noqa: F401
|
||||
Product, ProductLike, ProductImage, ProductSection,
|
||||
NavTop, NavSub, Listing, ListingItem,
|
||||
LinkError, LinkExternal, SubcategoryRedirect, ProductLog,
|
||||
ProductLabel, ProductSticker, ProductAttribute, ProductNutrition, ProductAllergen,
|
||||
CartItem,
|
||||
)
|
||||
1
market/models/market_place.py
Normal file
1
market/models/market_place.py
Normal file
@@ -0,0 +1 @@
|
||||
from shared.models.market_place import MarketPlace # noqa: F401
|
||||
2
shared
2
shared
Submodule shared updated: 60cd08adc9...dfc41ada7d
Reference in New Issue
Block a user