mirror of
https://github.com/ReVanced/revanced-api.git
synced 2026-01-22 10:43:58 +00:00
refactor: move versioning efforts to initalization
This commit is contained in:
committed by
Alexandre Teles (afterSt0rm)
parent
8d36663610
commit
42c88290b1
@@ -5,19 +5,21 @@ Routes:
|
||||
- GET /socials: Get ReVanced socials.
|
||||
"""
|
||||
|
||||
import os
|
||||
from sanic import Blueprint, Request
|
||||
from sanic.response import JSONResponse, json
|
||||
from sanic_ext import openapi
|
||||
|
||||
from api.models.socials import SocialsResponseModel
|
||||
from config import social_links, api_version
|
||||
from api.models.socials import ConnectionsResponseModel
|
||||
from config import social_links
|
||||
|
||||
socials: Blueprint = Blueprint(os.path.basename(__file__).strip(".py"))
|
||||
|
||||
socials: Blueprint = Blueprint("socials", version=api_version)
|
||||
|
||||
@socials.get("/socials")
|
||||
@openapi.definition(
|
||||
summary="Get ReVanced socials",
|
||||
response=[SocialsResponseModel],
|
||||
response=[ConnectionsResponseModel],
|
||||
)
|
||||
async def root(request: Request) -> JSONResponse:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user