- removes APNS support - changes the `django-push-notification` library from the `iskhakov` fork to the [`grafana` fork](https://github.com/grafana/django-push-notifications). This new fork basically just patches an issue which affected the database migrations of this django app (previously the library would not respect the `USER_MODEL` setting when creating its tables and would instead reference the `auth_user` table.. which we don't want) - add `--no-cache` flag to the `make build` command **NOTE** A migration should be applied as follows: ```bash # remove the four push_notifications tables, which have improper foreign key references python manage.py migrate push_notifications zero # recreate the tables with the proper foreign key references python manage.py migrate ```
20 lines
666 B
Python
20 lines
666 B
Python
from django.conf import settings
|
|
|
|
from apps.mobile_app.fcm_relay import FCMRelayView
|
|
from apps.mobile_app.views import FCMDeviceAuthorizedViewSet, MobileAppAuthTokenAPIView
|
|
from common.api_helpers.optional_slash_router import OptionalSlashRouter, optional_slash_path
|
|
|
|
app_name = "mobile_app"
|
|
router = OptionalSlashRouter()
|
|
|
|
router.register("fcm", FCMDeviceAuthorizedViewSet, basename="fcm")
|
|
|
|
urlpatterns = [
|
|
*router.urls,
|
|
optional_slash_path("auth_token", MobileAppAuthTokenAPIView.as_view(), name="auth_token"),
|
|
]
|
|
|
|
if settings.FCM_RELAY_ENABLED:
|
|
urlpatterns += [
|
|
optional_slash_path("fcm_relay", FCMRelayView.as_view(), name="fcm_relay"),
|
|
]
|