fix: api descript
This commit is contained in:
@@ -2,8 +2,11 @@ syntax = "v1"
|
||||
import "common.api"
|
||||
|
||||
type (
|
||||
PathId {
|
||||
Id int64 `path:"id"`
|
||||
}
|
||||
Notification {
|
||||
Id string `json:"id"`
|
||||
Id int64 `json:"id"`
|
||||
Type string `json:"type"`
|
||||
Title string `json:"title"`
|
||||
Content string `json:"content"`
|
||||
@@ -21,7 +24,6 @@ type (
|
||||
@server(
|
||||
prefix: api/v1
|
||||
group: notification
|
||||
jwt: Auth
|
||||
)
|
||||
service juwan-api {
|
||||
@doc "获取通知列表"
|
||||
@@ -30,7 +32,7 @@ service juwan-api {
|
||||
|
||||
@doc "标记已读"
|
||||
@handler ReadNotification
|
||||
put /notifications/:id/read (EmptyResp) returns (EmptyResp)
|
||||
put /notifications/:id/read (PathId) returns (EmptyResp)
|
||||
|
||||
@doc "全部已读"
|
||||
@handler ReadAllNotifications
|
||||
|
||||
Reference in New Issue
Block a user