del front and add auth

This commit is contained in:
SlimusMinus
2026-05-04 00:46:20 +03:00
parent c2774cf534
commit dfcd77fe88
15 changed files with 131 additions and 11 deletions

View File

@@ -58,8 +58,8 @@ public class MessageService {
: m.getSender().getId();
String email = isMeSender
? m.getReceiver().getEmail()
: m.getSender().getEmail();
? m.getReceiver().getLogin()
: m.getSender().getLogin();
int unread = messageRepository.countUnread(userId, otherUserId);

View File

@@ -15,7 +15,7 @@ public class UserService {
public User getCurrentUser() {
return repository.findByEmail("moscow_city231@rambler.ru")
return repository.findByLogin("moscow_city231@rambler.ru")
.orElseThrow(() -> new ApiException(
ErrorCode.NOT_FOUND,
"User not found",