-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fts request #18
base: master
Are you sure you want to change the base?
Add fts request #18
Conversation
add go server add fts request(only read) add text formatter add mongodb dictionary format delete openapi generation task add elasticsearch + kibana in docker-compose.yml small bug fix
@@ -65,7 +66,7 @@ SecurityFilterChain filterChain(HttpSecurity http) throws Exception { | |||
.authenticationManager(authenticationManager) | |||
.authorizeHttpRequests() | |||
.requestMatchers("/moderation").hasRole("ADMIN") | |||
.requestMatchers("/auth/login","/auth/registration","/errors").permitAll() | |||
.requestMatchers("/auth/login","/auth/registration","/errors", "/actuator/**").permitAll() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
убери актуатор
return response.getDocumentsList().stream() | ||
.map(document -> TextFormatter.formatFtsResponse(document.getText(), document.getMainWord())) | ||
.toList(); | ||
//ToDO починить хуйню, не работает т.к. долбоебы не догадались переопределить метод toString() для целого объекта, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
лишний коммент
|
||
@PostConstruct | ||
public void init(){ | ||
log.info(host); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
можно логи убрать
|
||
@Service | ||
@RequiredArgsConstructor | ||
public class TextFormatter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
стоит ли делать это через АОП
dictionaryDTO.setId(dictionary.getId()); | ||
dictionaryDTO.setName(dictionary.getName()); | ||
dictionaryDTO.setOwner(dictionary.getId()); | ||
dictionaryDTO.setWords(dictionary.getWords().stream().map(this::convertToWordDTO).toList()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
стоит подумать над использованием mapstruct
//} | ||
// | ||
//docJSON, err := json.Marshal(doc) | ||
//if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
убрать коммент
No description provided.