from django.contrib import admin
from django.http import HttpResponse
from django.urls import include, path

from apps.ap import views as ap_views
from apps.dashboard import views as dash_views


urlpatterns = [
    path('admin/', admin.site.urls),
    path('', dash_views.home_page, name='home'),
    path('api/', include('apps.api.urls')),
    path('dashboard/', include('apps.dashboard.urls')),
    path('dashboard/', include('apps.lyric.urls')),
    path('gameboard/', include('apps.gameboard.urls')),
    path('gameboard/', include('apps.epic.urls')),
    path('billboard/', include('apps.billboard.urls')),
    path('ap/', include('apps.ap.urls')),
    path('.well-known/webfinger', ap_views.webfinger, name='webfinger'),
    # Stripe webhook lives at a stable root-level URL (no `dashboard/` prefix
    # so we can keep the same endpoint pinned in the Stripe dashboard's
    # webhook config across any future app-routing refactors).
    path('stripe/webhook', dash_views.stripe_webhook, name='stripe_webhook'),
]

# Please remove the following urlpattern
## then install actual favicon.ico in staticroot
### and call {% static 'favicon.ico' %} in base.html
urlpatterns += [
    path("favicon.ico", lambda request: HttpResponse(status=204)),
]
