fixed POST addview
This commit is contained in:
@ -229,10 +229,11 @@ public class ResearchController {
|
||||
|
||||
///////
|
||||
//views part
|
||||
@PostMapping("/addview/{url}")
|
||||
@PostMapping("/addview/cdn/{url}")
|
||||
public ResponseEntity<ResearchDTO> addView(@PathVariable String url){
|
||||
Research research = researchesServ.getResearchByUrl(url);
|
||||
if (research ==null) return new ResponseEntity<>(HttpStatus.NOT_FOUND);
|
||||
System.out.println(url);
|
||||
Research research = researchesServ.getResearchByUrl("cdn/" + url);
|
||||
if (research ==null) return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
|
||||
|
||||
return new ResponseEntity<>(ResearchDTO.construct(researchesServ.addView(research)), HttpStatus.OK);
|
||||
}
|
||||
|
Reference in New Issue
Block a user