generated from halo-dev/plugin-starter
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add an API for moment detail (#80)
#### What type of PR is this? /kind feature #### What this PR does / why we need it: 提供获取单条瞬间详细信息的接口,此接口返回数据包括瞬间作者信息及点赞数、评论数等。 #### How to test it? 测试接口 `/apis/console.api.moment.halo.run/v1alpha1/moments/{name}` 是否可用。 #### Which issue(s) this PR fixes: Fixes #74 #### Does this PR introduce a user-facing change? ```release-note 提供获取单条瞬间详细信息的接口 ```
- Loading branch information
Showing
5 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/main/java/run/halo/moments/exception/NotFoundException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package run.halo.moments.exception; | ||
|
||
import org.springframework.http.HttpStatus; | ||
import org.springframework.web.server.ResponseStatusException; | ||
|
||
/** | ||
* NotFoundException. | ||
* | ||
* @author LIlGG | ||
*/ | ||
public class NotFoundException extends ResponseStatusException { | ||
public NotFoundException(String reason) { | ||
super(HttpStatus.NOT_FOUND, reason); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters