@dbbs/strapi-stripe-payment
Version:
Strapi integration plugin for Stripe payment system
31 lines (30 loc) • 989 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
/**
* TODO: Add logic to conditionally choose the middleware based on the selected authorization method.
* If Auth0 is selected, use `auth0AuthMiddleware`, otherwise use `extractUserMiddleware`.
*/
const extractUser_middleware_1 = __importDefault(require("../../middlewares/extractUser.middleware"));
exports.default = [
{
method: 'GET',
path: '/api/products',
handler: 'product.getProducts',
config: {
auth: false,
middlewares: [extractUser_middleware_1.default]
}
},
{
method: 'GET',
path: '/api/products/:id',
handler: 'product.getProductById',
config: {
auth: false,
middlewares: [extractUser_middleware_1.default]
}
}
];