feat: extract cms from mp/cms — initial libreshop/cms
Some checks failed
Build and publish / build (push) Failing after 17s
Some checks failed
Build and publish / build (push) Failing after 17s
Source moved verbatim from mp/cms/ on 2026-04-29; mp was the first concrete adapter consuming the libreshop toolkit. Builds and publishes git.librete.ch/libreshop/cms on every main / v* push via the standard .gitea/workflows/build.yml shared across libreshop components.
This commit is contained in:
90
src/api/product/routes/product.ts
Normal file
90
src/api/product/routes/product.ts
Normal file
@@ -0,0 +1,90 @@
|
||||
export default {
|
||||
routes: [
|
||||
{
|
||||
method: "POST",
|
||||
path: "/products",
|
||||
handler: "product.create",
|
||||
config: {
|
||||
policies: []
|
||||
}
|
||||
},
|
||||
{
|
||||
method: "GET",
|
||||
path: "/products",
|
||||
handler: "product.find",
|
||||
config: {
|
||||
policies: []
|
||||
}
|
||||
},
|
||||
{
|
||||
method: "GET",
|
||||
path: "/promo-products",
|
||||
handler: "product.findCheapest",
|
||||
config: {
|
||||
auth: false,
|
||||
policies: []
|
||||
}
|
||||
},
|
||||
{
|
||||
method: "GET",
|
||||
path: "/sitemap/products",
|
||||
handler: "product.sitemap",
|
||||
config: {
|
||||
auth: false,
|
||||
policies: []
|
||||
}
|
||||
},
|
||||
{
|
||||
method: "PUT",
|
||||
path: "/products/:id",
|
||||
handler: "product.update",
|
||||
config: {
|
||||
policies: []
|
||||
}
|
||||
},
|
||||
{
|
||||
method: "GET",
|
||||
path: "/products/:id",
|
||||
handler: "product.findOne",
|
||||
config: {
|
||||
auth: false,
|
||||
policies: []
|
||||
}
|
||||
},
|
||||
{
|
||||
method: "GET",
|
||||
path: "/products/:id/variants/all",
|
||||
handler: "product.allVariants",
|
||||
config: {
|
||||
auth: false,
|
||||
policies: []
|
||||
}
|
||||
},
|
||||
{
|
||||
method: "GET",
|
||||
path: "/products/:id/variants/pattern",
|
||||
handler: "product.variantsByPattern",
|
||||
config: {
|
||||
auth: false,
|
||||
policies: []
|
||||
}
|
||||
},
|
||||
{
|
||||
method: "GET",
|
||||
path: "/products/:id/variants",
|
||||
handler: "product.variants",
|
||||
config: {
|
||||
auth: false,
|
||||
policies: []
|
||||
}
|
||||
},
|
||||
{
|
||||
method: "POST",
|
||||
path: "/products/publish",
|
||||
handler: "product.publishByFilter",
|
||||
config: {
|
||||
policies: []
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
Reference in New Issue
Block a user