* refactor(chalice): upgraded dependencies * refactor(chalice): upgraded dependencies feat(chalice): support heatmaps * fix(chalice): fixed Math-operators validation refactor(chalice): search for sessions that have events for heatmaps * refactor(chalice): search for sessions that have at least 1 location event for heatmaps * refactor(chalice): upgraded dependencies * refactor(chalice): upgraded dependencies feat(chalice): support heatmaps * fix(chalice): fixed Math-operators validation refactor(chalice): search for sessions that have events for heatmaps * refactor(chalice): search for sessions that have at least 1 location event for heatmaps * refactor(chalice): upgraded dependencies refactor(crons): upgraded dependencies refactor(alerts): upgraded dependencies * feat(chalice): get top 10 values for autocomplete CH * refactor(chalice): cleaned code refactor(chalice): upgraded dependencies refactor(alerts): upgraded dependencies refactor(crons): upgraded dependencies * feat(chalice): autocomplete return top 10 with stats * fix(chalice): fixed autocomplete top 10 meta-filters * feat(chalice): spot login/logout/refresh feat(DB): support spot login/refresh
16 lines
786 B
Python
16 lines
786 B
Python
from fastapi import APIRouter, Depends
|
|
|
|
from auth.auth_apikey import APIKeyAuth
|
|
from auth.auth_jwt import JWTAuth
|
|
from auth.auth_project import ProjectAuthorizer
|
|
from or_dependencies import ORRoute
|
|
|
|
|
|
def get_routers(prefix="", extra_dependencies=[], tags=[]) -> (APIRouter, APIRouter, APIRouter):
|
|
public_app = APIRouter(route_class=ORRoute, prefix=prefix, tags=tags)
|
|
app = APIRouter(dependencies=[Depends(JWTAuth()), Depends(ProjectAuthorizer("projectId"))] + extra_dependencies,
|
|
route_class=ORRoute, prefix=prefix, tags=tags)
|
|
app_apikey = APIRouter(
|
|
dependencies=[Depends(APIKeyAuth()), Depends(ProjectAuthorizer("projectKey"))] + extra_dependencies,
|
|
route_class=ORRoute, prefix=prefix, tags=tags)
|
|
return public_app, app, app_apikey
|