最新的api路径

This commit is contained in:
eson
2023-07-12 14:11:04 +08:00
parent 3c9fb417aa
commit 4dbb77b306
29 changed files with 221 additions and 162 deletions

View File

@@ -14,12 +14,12 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
[]rest.Route{
{
Method: http.MethodGet,
Path: "/quotation/detail",
Path: "/api/quotation/detail",
Handler: QuotationDetailHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/backend-user/login",
Path: "/api/backend-user/login",
Handler: BackendUserLoginHandler(serverCtx),
},
},

View File

@@ -33,6 +33,20 @@ type Auth struct {
RefreshAfter int64 `json:"refreshAfter"`
}
type File struct {
Filename string `fsfile:"filename"`
Header map[string][]string `fsfile:"header"`
Size int64 `fsfile:"size"`
Data []byte `fsfile:"data"`
}
type Meta struct {
TotalCount int64 `json:"totalCount"`
PageCount int64 `json:"pageCount"`
CurrentPage int `json:"currentPage"`
PerPage int `json:"perPage"`
}
// Set 设置Response的Code和Message值
func (resp *Response) Set(Code int, Message string) *Response {
return &Response{