mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-07 17:33:18 +00:00
dc278a6064
For the coming features we will need to store files on the meet side. (for instance user backgrounds). This commits adds a new Model to manage files, and the associated serializers & viewsets. All are tested. This work was heavily inspired by the work done by our friends at https://github.com/suitenumerique/drive It build on the same architecture design (upload directly to S3 but download goes through our proxy), but model is much much simplier (no folders, no file sharing, etc.).
60 lines
1.5 KiB
Python
60 lines
1.5 KiB
Python
"""URL configuration for the core app."""
|
|
|
|
from django.conf import settings
|
|
from django.urls import include, path
|
|
|
|
from lasuite.oidc_login.urls import urlpatterns as oidc_urls
|
|
from rest_framework.routers import DefaultRouter
|
|
|
|
from core.api import get_frontend_configuration, viewsets
|
|
from core.external_api import viewsets as external_viewsets
|
|
|
|
# - Main endpoints
|
|
router = DefaultRouter()
|
|
router.register("users", viewsets.UserViewSet, basename="users")
|
|
router.register("rooms", viewsets.RoomViewSet, basename="rooms")
|
|
router.register("recordings", viewsets.RecordingViewSet, basename="recordings")
|
|
router.register("files", viewsets.FileViewSet, basename="files")
|
|
router.register(
|
|
"resource-accesses", viewsets.ResourceAccessViewSet, basename="resource_accesses"
|
|
)
|
|
|
|
# - External API
|
|
external_router = DefaultRouter()
|
|
external_router.register(
|
|
"application",
|
|
external_viewsets.ApplicationViewSet,
|
|
basename="external_application",
|
|
)
|
|
|
|
external_router.register(
|
|
"rooms",
|
|
external_viewsets.RoomViewSet,
|
|
basename="external_room",
|
|
)
|
|
|
|
urlpatterns = [
|
|
path(
|
|
f"api/{settings.API_VERSION}/",
|
|
include(
|
|
[
|
|
*router.urls,
|
|
*oidc_urls,
|
|
path("config/", get_frontend_configuration, name="config"),
|
|
]
|
|
),
|
|
),
|
|
]
|
|
|
|
if settings.EXTERNAL_API_ENABLED:
|
|
urlpatterns.append(
|
|
path(
|
|
f"external-api/{settings.EXTERNAL_API_VERSION}/",
|
|
include(
|
|
[
|
|
*external_router.urls,
|
|
]
|
|
),
|
|
)
|
|
)
|