2023-09-12 12:25:05 +02:00
|
|
|
from fastapi import APIRouter
|
2021-08-22 20:07:24 +02:00
|
|
|
|
2023-09-12 12:25:05 +02:00
|
|
|
from .db import core_app_extra, db
|
|
|
|
from .views.admin_api import admin_router
|
|
|
|
from .views.api import api_router
|
2020-01-31 21:07:05 +01:00
|
|
|
|
2023-09-12 12:25:05 +02:00
|
|
|
# this compat is needed for usermanager extension
|
|
|
|
from .views.generic import generic_router, update_user_extension
|
2023-09-25 15:04:44 +02:00
|
|
|
from .views.node_api import node_router, public_node_router, super_node_router
|
2023-09-12 12:25:05 +02:00
|
|
|
from .views.public_api import public_router
|
2023-12-06 10:54:40 +01:00
|
|
|
from .views.tinyurl_api import tinyurl_router
|
2023-12-05 15:56:45 +01:00
|
|
|
from .views.webpush_api import webpush_router
|
2020-01-31 21:07:05 +01:00
|
|
|
|
2023-09-12 12:25:05 +02:00
|
|
|
# backwards compatibility for extensions
|
|
|
|
core_app = APIRouter(tags=["Core"])
|
2020-01-31 21:07:05 +01:00
|
|
|
|
2022-12-22 16:30:37 +02:00
|
|
|
|
2023-09-12 12:25:05 +02:00
|
|
|
def init_core_routers(app):
|
|
|
|
app.include_router(core_app)
|
|
|
|
app.include_router(generic_router)
|
|
|
|
app.include_router(public_router)
|
|
|
|
app.include_router(api_router)
|
2023-09-25 15:04:44 +02:00
|
|
|
app.include_router(node_router)
|
|
|
|
app.include_router(super_node_router)
|
|
|
|
app.include_router(public_node_router)
|
2023-09-12 12:25:05 +02:00
|
|
|
app.include_router(admin_router)
|
2023-12-06 10:54:40 +01:00
|
|
|
app.include_router(tinyurl_router)
|
2023-12-05 15:56:45 +01:00
|
|
|
app.include_router(webpush_router)
|