mirror of https://github.com/halo-dev/halo
Update JournalController.java
parent
b61d24d7bd
commit
07d07e2170
|
@ -53,7 +53,7 @@ public class JournalController {
|
|||
@ApiOperation("Gets latest journals")
|
||||
public Page<JournalWithCmtCountDTO> pageBy(@PageableDefault(sort = "updateTime", direction = DESC) Pageable pageable,
|
||||
JournalQuery journalQuery) {
|
||||
Page<Journal> journalPage = journalService.pageBy(journalQuery,pageable);
|
||||
Page<Journal> journalPage = journalService.pageBy(journalQuery, pageable);
|
||||
return journalService.convertToCmtCountDto(journalPage);
|
||||
}
|
||||
|
||||
|
@ -80,6 +80,17 @@ public class JournalController {
|
|||
return new JournalDTO().convertFrom(journalService.update(journal));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete journal by id.
|
||||
*
|
||||
* @param journalId journalId
|
||||
*/
|
||||
@DeleteMapping("{journalId:\\d+}")
|
||||
@ApiOperation("Delete link by id")
|
||||
public void deletePermanently(@PathVariable("journalId") Integer journalId) {
|
||||
journalService.removeById(journalId);
|
||||
}
|
||||
|
||||
@GetMapping("{journalId:\\d+}/comments/tree_view")
|
||||
@ApiOperation("Lists comments with tree view")
|
||||
public Page<BaseCommentVO> listCommentTree(@PathVariable("journalId") Integer journalId,
|
||||
|
|
Loading…
Reference in New Issue