Skip to content

Commit 638c7c4

Browse files
committed
refactor(api): use camelCase for isDashboardLogin in request-code
1 parent e700c64 commit 638c7c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

routes/api/v1/auth/request-code.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import 'package:ht_shared/ht_shared.dart'; // For exceptions
1010
///
1111
/// - For the user-facing app, it sends a verification code to the provided
1212
/// email, supporting both sign-in and sign-up.
13-
/// - For the dashboard, the request body must include `"is_dashboard_login": true`.
13+
/// - For the dashboard, the request body must include `"isDashboardLogin": true`.
1414
/// In this mode, it first verifies the user exists and has 'admin' or
1515
/// 'publisher' roles before sending a code, effectively acting as a
1616
/// login-only gate.
@@ -44,7 +44,7 @@ Future<Response> onRequest(RequestContext context) async {
4444
}
4545

4646
// Check for the optional dashboard login flag. Default to false if not present.
47-
final isDashboardLogin = (body['is_dashboard_login'] as bool?) ?? false;
47+
final isDashboardLogin = (body['isDashboardLogin'] as bool?) ?? false;
4848

4949
// Basic email format check (more robust validation can be added)
5050
// Using a slightly more common regex pattern

0 commit comments

Comments
 (0)