Add /devices/register/ route alias for mobile clients

The KMM mobile app calls /api/notifications/devices/register/ but
the Go API had /api/notifications/devices/. Added alias to support both.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-11-29 11:43:32 -06:00
parent 80c9fca6e9
commit c4118c8186
2 changed files with 2 additions and 1 deletions

View File

@@ -220,7 +220,7 @@ dokku config:set casera-api \
EMAIL_USE_TLS=true \ EMAIL_USE_TLS=true \
EMAIL_HOST_USER=treytartt@fastmail.com \ EMAIL_HOST_USER=treytartt@fastmail.com \
EMAIL_HOST_PASSWORD=2t9y4n4t497z5863 \ EMAIL_HOST_PASSWORD=2t9y4n4t497z5863 \
DEFAULT_FROM_EMAIL="Casera <noreply@casera.com>" DEFAULT_FROM_EMAIL="Casera <treytartt@fastmail.com>"
``` ```
### 3. Apple Sign In (Optional) ### 3. Apple Sign In (Optional)

View File

@@ -316,6 +316,7 @@ func setupNotificationRoutes(api *gin.RouterGroup, notificationHandler *handlers
notifications.POST("/:id/read/", notificationHandler.MarkAsRead) notifications.POST("/:id/read/", notificationHandler.MarkAsRead)
notifications.POST("/devices/", notificationHandler.RegisterDevice) notifications.POST("/devices/", notificationHandler.RegisterDevice)
notifications.POST("/devices/register/", notificationHandler.RegisterDevice) // Alias for mobile clients
notifications.GET("/devices/", notificationHandler.ListDevices) notifications.GET("/devices/", notificationHandler.ListDevices)
notifications.DELETE("/devices/:id/", notificationHandler.DeleteDevice) notifications.DELETE("/devices/:id/", notificationHandler.DeleteDevice)