Imports cleanup
This commit is contained in:
parent
90ed86400b
commit
7ff31c45ee
@ -2,9 +2,6 @@ package org.ros.chatto.controller;
|
||||
|
||||
import java.security.Principal;
|
||||
import java.time.Instant;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.format.DateTimeFormatterBuilder;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
@ -93,9 +90,8 @@ public class ChatMessageController {
|
||||
@PathVariable final String userName,
|
||||
@PathVariable final Instant lastMessageTime,
|
||||
final Principal principal) {
|
||||
final List<ChatMessageDTO> chatMessageDTOs = chatService
|
||||
.getNewMessages(principal.getName(), userName,
|
||||
Date.from(lastMessageTime));
|
||||
final List<ChatMessageDTO> chatMessageDTOs = chatService.getNewMessages(
|
||||
principal.getName(), userName, Date.from(lastMessageTime));
|
||||
return chatMessageDTOs;
|
||||
}
|
||||
|
||||
|
@ -13,8 +13,6 @@ import javax.validation.Valid;
|
||||
import org.ros.chatto.dto.UserRegistrationDTO;
|
||||
import org.ros.chatto.service.CaptchaService;
|
||||
import org.ros.chatto.service.UserService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
@ -1,7 +1,6 @@
|
||||
package org.ros.chatto.model;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.persistence.CascadeType;
|
||||
@ -50,14 +49,15 @@ public class ChatUser {
|
||||
|
||||
@ToString.Exclude
|
||||
@EqualsAndHashCode.Exclude
|
||||
@OneToMany(mappedBy = "user", cascade = { CascadeType.PERSIST, CascadeType.MERGE, CascadeType.DETACH,
|
||||
CascadeType.REFRESH })
|
||||
@OneToMany(mappedBy = "user", cascade = { CascadeType.PERSIST,
|
||||
CascadeType.MERGE, CascadeType.DETACH, CascadeType.REFRESH })
|
||||
@JsonBackReference
|
||||
private Set<UserRole> userRoles;
|
||||
|
||||
// @ToString.Exclude
|
||||
// @EqualsAndHashCode.Exclude
|
||||
// @OneToMany(mappedBy = "fromUser", cascade = { CascadeType.PERSIST, CascadeType.MERGE, CascadeType.DETACH,
|
||||
// @OneToMany(mappedBy = "fromUser", cascade = { CascadeType.PERSIST,
|
||||
// CascadeType.MERGE, CascadeType.DETACH,
|
||||
// CascadeType.REFRESH })
|
||||
// private List<ChatMessage> chatMessages;
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ import java.io.IOException;
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.ServletException;
|
||||
|
Loading…
Reference in New Issue
Block a user