Skip to content

refactor: application detail route to use userId query param #1146

@coderabbitai

Description

@coderabbitai

Problem

The current application detail route is defined with an :id path parameter (/applications/:id), but the implementation has been changed to fetch applications by userId instead of applicationId. This creates a mismatch:

  • The route definition still declares { path: '/:id' }
  • The model() method no longer accepts params and ignores the ID
  • Calling code (e.g., status-card.js) still passes applicationId during transitions, which is silently ignored
  • The route now fetches all applications for the current user and returns applications[0]

Proposed Solution

Refactor the route to use a query parameter approach:

  • Change route path from /applications/:id to /applications (or similar)
  • Accept userId as a query parameter: /applications?userId=...
  • Update the route definition and model hook to properly handle the query parameter
  • Update all calling code to transition using the userId query param instead of applicationId path param

Context

This refactoring is needed to align the route definition with its implementation and make the API contract explicit.

Backlinks:

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions