51 lines
1.2 KiB
Python
51 lines
1.2 KiB
Python
from fastapi import APIRouter
|
|
|
|
from app.api.routes import (
|
|
admin,
|
|
authentication,
|
|
comments,
|
|
home_featured,
|
|
profiles,
|
|
tags,
|
|
users,
|
|
password_reset,
|
|
uploads,
|
|
)
|
|
from app.api.routes.articles import api as articles
|
|
|
|
router = APIRouter()
|
|
|
|
# authentication /auth
|
|
router.include_router(authentication.router, tags=["authentication"], prefix="/auth")
|
|
|
|
# password reset /auth/password
|
|
router.include_router(password_reset.router, prefix="/auth/password")
|
|
|
|
# current user /user
|
|
router.include_router(users.router, tags=["users"], prefix="/user")
|
|
|
|
# profiles /profiles/{username}
|
|
router.include_router(profiles.router, tags=["profiles"], prefix="/profiles")
|
|
|
|
# articles /articles/**
|
|
router.include_router(articles.router, tags=["articles"])
|
|
|
|
# comments /articles/{slug}/comments/**
|
|
router.include_router(
|
|
comments.router,
|
|
tags=["comments"],
|
|
prefix="/articles/{slug}/comments",
|
|
)
|
|
|
|
# tags /tags
|
|
router.include_router(tags.router, tags=["tags"], prefix="/tags")
|
|
|
|
# upload image POST /upload-image
|
|
router.include_router(uploads.router)
|
|
|
|
# home featured /home-featured-articles
|
|
router.include_router(home_featured.router)
|
|
|
|
# admin backend /admin/**
|
|
router.include_router(admin.router)
|