Some checks failed
Build docker and publish / prepare (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.admin image_name:ppanel-admin name:admin]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.api image_name:ppanel-api name:api]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.node image_name:ppanel-node name:node]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.queue image_name:ppanel-queue name:queue]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.scheduler image_name:ppanel-scheduler name:scheduler]) (push) Has been cancelled
Build docker and publish / deploy (push) Has been cancelled
Build docker and publish / notify (push) Has been cancelled
46 lines
859 B
Plaintext
46 lines
859 B
Plaintext
syntax = "v1"
|
|
|
|
info (
|
|
title: "公告管理"
|
|
)
|
|
|
|
type (
|
|
CreateAnnouncementReq {
|
|
Title string `json:"title"`
|
|
Content string `json:"content"`
|
|
}
|
|
|
|
AdminAnnouncementResp {
|
|
Id int64 `json:"id"`
|
|
Title string `json:"title"`
|
|
Content string `json:"content"`
|
|
CreatedAt string `json:"created_at"`
|
|
}
|
|
|
|
UpdateAnnouncementReq {
|
|
Id int64 `path:"id"`
|
|
Title string `json:"title"`
|
|
Content string `json:"content"`
|
|
}
|
|
|
|
DeleteAnnouncementReq {
|
|
Id int64 `path:"id"`
|
|
}
|
|
)
|
|
|
|
@server (
|
|
prefix: /api/v1/admin/announcement
|
|
group: announcement
|
|
jwt: JwtAuth
|
|
)
|
|
service ppaneladmin {
|
|
@handler CreateAnnouncementHandler
|
|
post /create (CreateAnnouncementReq) returns (AdminAnnouncementResp)
|
|
|
|
@handler UpdateAnnouncementHandler
|
|
put /:id (UpdateAnnouncementReq)
|
|
|
|
@handler DeleteAnnouncementHandler
|
|
delete /:id (DeleteAnnouncementReq)
|
|
}
|