fix: export request types from add and remove product endpoints (#1078)
This commit is contained in:
committed by
olivermrbl
parent
7c31acb064
commit
1f2ee04abe
@@ -17,13 +17,25 @@ export default (app) => {
|
||||
route.get("/:id", middlewares.wrap(require("./get-collection").default))
|
||||
route.get("/", middlewares.wrap(require("./list-collections").default))
|
||||
|
||||
route.post("/:id/products/batch", middlewares.wrap(require("./add-products").default))
|
||||
route.delete("/:id/products/batch", middlewares.wrap(require("./remove-products").default))
|
||||
route.post(
|
||||
"/:id/products/batch",
|
||||
middlewares.wrap(require("./add-products").default)
|
||||
)
|
||||
route.delete(
|
||||
"/:id/products/batch",
|
||||
middlewares.wrap(require("./remove-products").default)
|
||||
)
|
||||
|
||||
return app
|
||||
}
|
||||
|
||||
export const defaultAdminCollectionsFields = ["id", "title", "handle", "created_at", "updated_at"]
|
||||
export const defaultAdminCollectionsFields = [
|
||||
"id",
|
||||
"title",
|
||||
"handle",
|
||||
"created_at",
|
||||
"updated_at",
|
||||
]
|
||||
export const defaultAdminCollectionsRelations = ["products"]
|
||||
|
||||
export type AdminCollectionsListRes = PaginatedResponse & {
|
||||
@@ -36,9 +48,10 @@ export type AdminCollectionsRes = {
|
||||
collection: ProductCollection
|
||||
}
|
||||
|
||||
export * from "./add-products"
|
||||
export * from "./create-collection"
|
||||
export * from "./delete-collection"
|
||||
export * from "./get-collection"
|
||||
export * from "./list-collections"
|
||||
export * from "./remove-products"
|
||||
export * from "./update-collection"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user