添加校验
This commit is contained in:
parent
57b43d3ce7
commit
9d5b471b73
@ -28,7 +28,7 @@ public class MusicController {
|
||||
public Mono<List<SongInfoResponse.ResultSong>> search(String name,
|
||||
@RequestParam(required = false, defaultValue = "1") Integer type) {
|
||||
|
||||
return musicService.searchMusic(name.trim(),type);
|
||||
return musicService.searchMusic(name.replaceAll("^[^\\u4e00-\\u9fa5\\d]+|[^\\u4e00-\\u9fa5\\d]+$", ""),type);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user