Move all the APIs under the same router
This commit is contained in:
parent
3d46cb5ec9
commit
c54ceeb7a8
27 changed files with 1289 additions and 351 deletions
16
kick/urls.py
16
kick/urls.py
|
|
@ -1,8 +1,8 @@
|
|||
from typing import TYPE_CHECKING
|
||||
|
||||
from django.urls import path
|
||||
from django.views.generic.base import RedirectView
|
||||
|
||||
from kick import api
|
||||
from kick import views
|
||||
from kick.feeds import KickCampaignAtomFeed
|
||||
from kick.feeds import KickCampaignDiscordFeed
|
||||
|
|
@ -24,18 +24,20 @@ if TYPE_CHECKING:
|
|||
app_name = "kick"
|
||||
|
||||
urlpatterns: list[URLPattern | URLResolver] = [
|
||||
# /kick/api/v1/campaigns/
|
||||
path(
|
||||
route="api/v1/campaigns/",
|
||||
view=api.campaign_list_api,
|
||||
name="campaign_api_list",
|
||||
),
|
||||
# /kick/
|
||||
path(
|
||||
route="",
|
||||
view=views.dashboard,
|
||||
name="dashboard",
|
||||
),
|
||||
# Redirect old Kick v1 campaign API to the new combined API
|
||||
path(
|
||||
route="api/v1/campaigns/",
|
||||
view=RedirectView.as_view(
|
||||
pattern_name="api-v1:kick-api-v1_list_campaigns",
|
||||
permanent=True,
|
||||
),
|
||||
),
|
||||
# /kick/campaigns/
|
||||
path(
|
||||
route="campaigns/",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue