oncall-engine/engine/apps/mobile_app/urls.py
Yulya Artyukhina 76a0643bc5
"Going oncall" notification settings (#3187)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-10-30 13:44:18 +00:00

27 lines
1 KiB
Python

from apps.mobile_app.fcm_relay import FCMRelayView
from apps.mobile_app.views import FCMDeviceAuthorizedViewSet, MobileAppAuthTokenAPIView, MobileAppUserSettingsViewSet
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"),
optional_slash_path(
"user_settings/notification_timing_options",
MobileAppUserSettingsViewSet.as_view({"get": "notification_timing_options"}),
name="notification_timing_options",
),
optional_slash_path(
"user_settings",
MobileAppUserSettingsViewSet.as_view({"get": "retrieve", "put": "update", "patch": "partial_update"}),
name="user_settings",
),
]
urlpatterns += [
optional_slash_path("fcm_relay", FCMRelayView.as_view(), name="fcm_relay"),
]