ADD Dropdown component for user actions

This commit is contained in:
2025-06-24 22:52:24 +02:00
parent d3dce9ec25
commit 38f3778a6b
8 changed files with 503 additions and 36 deletions

View File

@@ -26,10 +26,22 @@ public class AuthController {
));
}
if (principal.getAttribute("email") == null
|| principal.getAttribute("name") == null
|| principal.getAttribute("picture") == null) {
return ResponseEntity.status(HttpStatus.BAD_REQUEST).
body(new APIResponse<>(
"error",
"Required user attributes are missing",
null
));
}
return ResponseEntity.ok(
new APIResponse<>("success", "User details retrieved successfully", Map.of(
"name", principal.getAttribute("name"),
"email", principal.getAttribute("email"))
"email", principal.getAttribute("email"),
"profilePicture", principal.getAttribute("picture"))
)
);
}