最新的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,37 +14,37 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
[]rest.Route{
{
Method: http.MethodPost,
Path: "/cart/add",
Path: "/api/cart/add",
Handler: CartAddHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/cart/del",
Path: "/api/cart/del",
Handler: CartDeleteHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/cart/num",
Path: "/api/cart/num",
Handler: CartNumberHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/cart/list",
Path: "/api/cart/list",
Handler: CartListHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/cart/order-detail",
Path: "/api/cart/order-detail",
Handler: CartOrderDetailHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/cart/chang-order-method",
Path: "/api/cart/chang-order-method",
Handler: ChangeOrderMethodHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/cart/create-order",
Path: "/api/cart/create-order",
Handler: CreateOrderHandler(serverCtx),
},
},

View File

@@ -132,6 +132,13 @@ 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"`