mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-06 00:09:22 +00:00
Try to match on the v2 alert endpoints in the router **before** the v1
endpoints.
If we try to match on the v1 endpoints first then a call to a v2
endpoint such as
`GET: /api/v2/my-org/alerts`
will actually match with the v1 endpoint
`GET: /api/{org_id}/alerts`
where `v2` will be bound to `{org_id}`.
If we swap the matching order then requests to v2 endpoints will be
correctly routed to v2 endpoints and requests to v1 endpoints will be
correctly routed to v1 endpoints.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Refactor**
- Reorganized alert-related service routes in the application
- Removed and re-added existing alert service routes without changing
their core functionality
<!-- end of auto-generated comment: release notes by coderabbit.ai -->