Commit 9a2b1e9
committed
fix(auth): make request-code handler resilient to body param types
Refactors the parsing of the `isDashboardLogin` parameter in the
`/api/v1/auth/request-code` route handler.
Previously, the handler would crash with a type cast error if the
`isDashboardLogin` value was sent as a string (e.g., `"true"`) instead
of a boolean.
This change introduces robust parsing that correctly handles values
that are boolean `true`, the string `"true"`, or missing, preventing
the 500 Internal Server Error and making the endpoint more resilient
to varied client implementations.1 parent ca36a5c commit 9a2b1e9
1 file changed
+11
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
48 | 57 | | |
49 | 58 | | |
50 | 59 | | |
| |||
0 commit comments