Commit 84c717c
committed
fix(webapp): migrate Sessions routes to new createLoaderApiRoute auth shape
The auth-consolidation commit on main rewrote createLoaderApiRoute's
authorization contract:
- `resource` returns a typed RbacResource ({ type, id }) instead of an
untyped record ({ deployments: 'current' } / { sessions: [...] })
- multi-resource auth uses `anyResource(...)` instead of an array literal
- `superScopes` is no longer a field — super-scopes are resolved at the
JWT ability layer
- the `findResource` resolver must return `T | undefined`, not `T | null`
Our Sessions PR added two routes (api.v1.deployments.current.ts and
realtime.v1.sessions.$session.$io.records.ts) using the pre-consolidation
shape. The rebase had no textual conflict because the files didn't exist
on main, but typecheck fails because the new contract doesn't accept the
old shape. Migrate both routes to match.1 parent 1020060 commit 84c717c
2 files changed
Lines changed: 8 additions & 6 deletions
File tree
- apps/webapp/app/routes
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
| 11 | + | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | | - | |
| 37 | + | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| |||
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
67 | | - | |
| 71 | + | |
68 | 72 | | |
69 | | - | |
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
| |||
0 commit comments