Skip to content

Commit

Permalink
pref: remove useless code.
Browse files Browse the repository at this point in the history
  • Loading branch information
ruibaby committed Dec 25, 2019
1 parent a246dc6 commit f99daee
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,6 @@ public String post(@PathVariable("url") String url,
public String password(@PathVariable("url") String url,
Model model) {
Post post = postService.getBy(PostStatus.INTIMATE, url);
if (null == post) {
throw new ForbiddenException("没有查询到该文章信息");
}

model.addAttribute("url", url);
return "common/template/post_password";
Expand All @@ -185,9 +182,6 @@ public String password(@PathVariable("url") String url,
public String password(@PathVariable("url") String url,
@RequestParam(value = "password") String password) {
Post post = postService.getBy(PostStatus.INTIMATE, url);
if (null == post) {
throw new NotFoundException("查询不到该文章的信息").setErrorData(url);
}

if (password.equals(post.getPassword())) {
String token = IdUtil.simpleUUID();
Expand Down

0 comments on commit f99daee

Please sign in to comment.