front ui fix

This commit is contained in:
2026-05-13 14:39:57 +08:00
parent 9e42918d5e
commit 28eb17f60b
6 changed files with 54 additions and 23 deletions
@@ -35,24 +35,6 @@ public class RestMsgController extends BaseController {
@Autowired
private IUsersService usersService;
// ─── Debug (TEMP) ─────────────────────────────────────────────────────
/** Temp debug: returns raw message counts and inbox list for current user. */
@GetMapping("/debug/inbox")
public ApiResponse<Map<String, Object>> debugInbox(HttpServletRequest request) {
UserInfo user = getUserInfo(request);
if (user == null) return ApiResponse.fail(401, "请先登录");
long unread = messageService.countUnread(user.getId());
List<Message> inbox = messageService.getInbox(user.getId());
return ApiResponse.ok(Map.of(
"userId", user.getId(),
"username", user.getUsername(),
"unreadCount", unread,
"inboxSize", inbox.size(),
"inbox", inbox
));
}
// ─── User card (public — accessible to any authenticated user) ────────
/** Returns basic user info for the hover card (discussionsCount, commentsCount). */