Commit 1e287c4
fix(auth): resolve Prisma alunoId vs Auth UUID in delete+update authorization
deleteTreinoAction and updateTreinoDayAction compared treino.alunoId
(Prisma ID) against user.id (Auth UUID), always mismatching after
PR #174 FK fix. Resolve aluno.id by email before auth check.
Co-Authored-By: Claude <noreply@anthropic.com>1 parent e7900ca commit 1e287c4
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
246 | 249 | | |
247 | 250 | | |
248 | 251 | | |
249 | | - | |
| 252 | + | |
250 | 253 | | |
251 | 254 | | |
252 | 255 | | |
| |||
286 | 289 | | |
287 | 290 | | |
288 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
289 | 295 | | |
290 | 296 | | |
291 | 297 | | |
292 | | - | |
| 298 | + | |
293 | 299 | | |
294 | 300 | | |
295 | 301 | | |
| |||
0 commit comments