qumra-engine 2.0.145 → 2.0.148
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/initClient.d.ts +0 -0
- package/dist/config/initClient.js +46 -0
- package/dist/config/logger.d.ts +0 -0
- package/dist/config/logger.js +75 -0
- package/dist/controllers/article/create-comment.controller.d.ts +2 -0
- package/dist/controllers/article/create-comment.controller.js +17 -0
- package/dist/controllers/auth/activate-password-backignore.controller.d.ts +2 -0
- package/dist/controllers/auth/activate-password-backignore.controller.js +25 -0
- package/dist/controllers/auth/create-customer.controller.d.ts +2 -0
- package/dist/controllers/auth/create-customer.controller.js +24 -0
- package/dist/controllers/auth/customer-address.controller.d.ts +2 -0
- package/dist/controllers/auth/customer-address.controller.js +20 -0
- package/dist/controllers/auth/customer-login-verify.controller.d.ts +2 -0
- package/dist/controllers/auth/customer-login-verify.controller.js +21 -0
- package/dist/controllers/auth/customer-login.controller.d.ts +2 -0
- package/dist/controllers/auth/customer-login.controller.js +23 -0
- package/dist/controllers/auth/customer.controller.d.ts +2 -0
- package/dist/controllers/auth/customer.controller.js +25 -0
- package/dist/controllers/auth/guest-login-backignore.controller.d.ts +2 -0
- package/dist/controllers/auth/guest-login-backignore.controller.js +25 -0
- package/dist/controllers/auth/recover-password-backignore.controller.d.ts +2 -0
- package/dist/controllers/auth/recover-password-backignore.controller.js +26 -0
- package/dist/controllers/auth/reset-password-backignore.controller.d.ts +2 -0
- package/dist/controllers/auth/reset-password-backignore.controller.js +25 -0
- package/dist/controllers/auth/storefront-password-backignore.controller.d.ts +2 -0
- package/dist/controllers/auth/storefront-password-backignore.controller.js +25 -0
- package/dist/controllers/cart/add-to-cart.controller.d.ts +2 -0
- package/dist/controllers/cart/add-to-cart.controller.js +20 -0
- package/dist/controllers/cart/update-cart.controller.d.ts +2 -0
- package/dist/controllers/cart/update-cart.controller.js +26 -0
- package/dist/controllers/checkout/checkout.controller.d.ts +2 -0
- package/dist/controllers/checkout/checkout.controller.js +23 -0
- package/dist/controllers/contact/contact.controller.d.ts +2 -0
- package/dist/controllers/contact/contact.controller.js +20 -0
- package/dist/controllers/localize/currency.controller.d.ts +2 -0
- package/dist/controllers/localize/currency.controller.js +17 -0
- package/dist/controllers/localize/lang.controller.d.ts +2 -0
- package/dist/controllers/localize/lang.controller.js +18 -0
- package/dist/controllers/localize/market.controller.d.ts +2 -0
- package/dist/controllers/localize/market.controller.js +17 -0
- package/dist/extensions/Iteration/break.d.ts +9 -0
- package/dist/extensions/Iteration/break.js +23 -0
- package/dist/extensions/Iteration/continue.d.ts +2 -0
- package/dist/extensions/Iteration/continue.js +10 -0
- package/dist/extensions/{logic/form.d.ts → Iteration/cycle.d.ts} +1 -2
- package/dist/extensions/Iteration/cycle.js +26 -0
- package/dist/extensions/Iteration/forx.d.ts +6 -0
- package/dist/extensions/Iteration/forx.js +69 -0
- package/dist/extensions/Iteration/index.d.ts +2 -0
- package/dist/extensions/Iteration/index.js +10 -0
- package/dist/extensions/html/form.d.ts +13 -0
- package/dist/extensions/html/form.js +77 -0
- package/dist/extensions/html/index.d.ts +2 -0
- package/dist/extensions/html/index.js +10 -0
- package/dist/extensions/html/style.d.ts +7 -0
- package/dist/extensions/html/style.js +26 -0
- package/dist/extensions/index.d.ts +3 -11
- package/dist/extensions/index.js +16 -25
- package/dist/extensions/logic/all_products.d.ts +6 -0
- package/dist/extensions/logic/all_products.js +55 -0
- package/dist/extensions/logic/content.js +3 -0
- package/dist/extensions/logic/echo.d.ts +7 -0
- package/dist/extensions/logic/echo.js +22 -0
- package/dist/extensions/logic/index.d.ts +12 -0
- package/dist/extensions/logic/index.js +31 -0
- package/dist/extensions/logic/log.d.ts +6 -0
- package/dist/extensions/logic/log.js +26 -0
- package/dist/extensions/logic/template.js +3 -0
- package/dist/extensions/logic/ui.js +4 -1
- package/dist/extensions/registerAllExtensions.d.ts +1 -1
- package/dist/extensions/registerAllExtensions.js +7 -5
- package/dist/filters/index.d.ts +10 -10
- package/dist/filters/index.js +25 -21
- package/dist/filters/logic/array/find_index.d.ts +1 -0
- package/dist/filters/logic/array/find_index.js +8 -0
- package/dist/filters/logic/array/has.d.ts +1 -0
- package/dist/filters/logic/array/has.js +9 -0
- package/dist/filters/logic/array/index.d.ts +19 -0
- package/dist/filters/logic/array/index.js +44 -0
- package/dist/filters/logic/array/map.d.ts +1 -0
- package/dist/filters/logic/array/map.js +9 -0
- package/dist/filters/logic/array/reject.d.ts +1 -0
- package/dist/filters/logic/array/reject.js +15 -0
- package/dist/filters/logic/array/reverse.d.ts +1 -0
- package/dist/filters/logic/array/reverse.js +9 -0
- package/dist/filters/logic/array/sort.d.ts +1 -0
- package/dist/filters/logic/array/sort.js +20 -0
- package/dist/filters/logic/array/sort_natural.d.ts +1 -0
- package/dist/filters/logic/array/sort_natural.js +20 -0
- package/dist/filters/logic/array/sum.d.ts +1 -0
- package/dist/filters/logic/array/sum.js +9 -0
- package/dist/filters/logic/array/uniq.d.ts +1 -0
- package/dist/filters/logic/array/uniq.js +9 -0
- package/dist/filters/logic/array/uniq_by.d.ts +1 -0
- package/dist/filters/logic/array/uniq_by.js +29 -0
- package/dist/filters/logic/cart/index.d.ts +2 -0
- package/dist/filters/logic/cart/index.js +10 -0
- package/dist/filters/logic/cart/item_count_for_variant.d.ts +1 -0
- package/dist/filters/logic/cart/item_count_for_variant.js +11 -0
- package/dist/filters/logic/cart/line_items_for.d.ts +1 -0
- package/dist/filters/logic/cart/line_items_for.js +15 -0
- package/dist/filters/logic/colors/brightness_difference.d.ts +1 -0
- package/dist/filters/logic/colors/brightness_difference.js +12 -0
- package/dist/filters/logic/colors/color_brightness.d.ts +1 -0
- package/dist/filters/logic/colors/color_brightness.js +7 -0
- package/dist/filters/logic/colors/color_contrast.d.ts +1 -0
- package/dist/filters/logic/colors/color_contrast.js +12 -0
- package/dist/filters/logic/colors/color_darken.d.ts +1 -0
- package/dist/filters/logic/colors/color_darken.js +7 -0
- package/dist/filters/logic/colors/color_desaturate.d.ts +1 -0
- package/dist/filters/logic/colors/color_desaturate.js +7 -0
- package/dist/filters/logic/colors/color_difference.d.ts +1 -0
- package/dist/filters/logic/colors/color_difference.js +12 -0
- package/dist/filters/logic/colors/color_extract.d.ts +1 -0
- package/dist/filters/logic/colors/color_extract.js +22 -0
- package/dist/filters/logic/colors/color_lighten.d.ts +1 -0
- package/dist/filters/logic/colors/color_lighten.js +7 -0
- package/dist/filters/logic/colors/color_mix.d.ts +1 -0
- package/dist/filters/logic/colors/color_mix.js +12 -0
- package/dist/filters/logic/colors/color_modify.d.ts +1 -0
- package/dist/filters/logic/colors/color_modify.js +26 -0
- package/dist/filters/logic/colors/color_saturate.d.ts +1 -0
- package/dist/filters/logic/colors/color_saturate.js +7 -0
- package/dist/filters/logic/colors/color_to_hsl.d.ts +1 -0
- package/dist/filters/logic/colors/color_to_hsl.js +7 -0
- package/dist/filters/logic/colors/color_to_oklch.d.ts +1 -0
- package/dist/filters/logic/colors/color_to_oklch.js +12 -0
- package/dist/filters/logic/colors/color_to_rgb.d.ts +1 -0
- package/dist/filters/logic/colors/color_to_rgb.js +7 -0
- package/dist/filters/logic/colors/hex_to_rgba.d.ts +1 -0
- package/dist/filters/logic/colors/hex_to_rgba.js +7 -0
- package/dist/filters/logic/colors/index.d.ts +16 -0
- package/dist/filters/logic/colors/index.js +38 -0
- package/dist/filters/logic/customer/customer_login_link.d.ts +2 -0
- package/dist/filters/logic/customer/customer_login_link.js +10 -0
- package/dist/filters/logic/customer/customer_logout_link.d.ts +2 -0
- package/dist/filters/logic/customer/customer_logout_link.js +10 -0
- package/dist/filters/logic/customer/customer_register_link.d.ts +2 -0
- package/dist/filters/logic/customer/customer_register_link.js +10 -0
- package/dist/filters/logic/customer/index.d.ts +4 -0
- package/dist/filters/logic/customer/index.js +14 -0
- package/dist/filters/logic/customer/login_button.d.ts +7 -0
- package/dist/filters/logic/customer/login_button.js +39 -0
- package/dist/filters/logic/default/default_pagination.d.ts +10 -0
- package/dist/filters/logic/default/default_pagination.js +41 -0
- package/dist/filters/logic/default/index.d.ts +1 -0
- package/dist/filters/logic/default/index.js +8 -0
- package/dist/filters/logic/format/date.d.ts +1 -0
- package/dist/filters/logic/format/date.js +13 -0
- package/dist/filters/logic/format/index.d.ts +4 -0
- package/dist/filters/logic/format/index.js +14 -0
- package/dist/filters/logic/format/structured_data.d.ts +2 -0
- package/dist/filters/logic/format/structured_data.js +11 -0
- package/dist/filters/logic/format/unit_price_with_measurement.d.ts +1 -0
- package/dist/filters/logic/format/unit_price_with_measurement.js +9 -0
- package/dist/filters/logic/format/weight_with_unit.d.ts +1 -0
- package/dist/filters/logic/format/weight_with_unit.js +12 -0
- package/dist/filters/logic/html/highlight.d.ts +1 -0
- package/dist/filters/logic/html/highlight.js +22 -0
- package/dist/filters/logic/html/index.d.ts +7 -0
- package/dist/filters/logic/html/index.js +20 -0
- package/dist/filters/logic/html/link_to.d.ts +8 -0
- package/dist/filters/logic/html/link_to.js +30 -0
- package/dist/filters/logic/html/placeholder_svg_tag.d.ts +7 -0
- package/dist/filters/logic/html/placeholder_svg_tag.js +28 -0
- package/dist/filters/logic/html/preload_tag.d.ts +7 -0
- package/dist/filters/logic/html/preload_tag.js +27 -0
- package/dist/filters/logic/html/script_tag.d.ts +7 -0
- package/dist/filters/logic/html/script_tag.js +30 -0
- package/dist/filters/logic/html/stylesheet_tag.d.ts +8 -0
- package/dist/filters/logic/html/stylesheet_tag.js +29 -0
- package/dist/filters/logic/html/time_tag.d.ts +7 -0
- package/dist/filters/logic/html/time_tag.js +28 -0
- package/dist/filters/logic/localization/currency_selector.d.ts +7 -0
- package/dist/filters/logic/localization/currency_selector.js +54 -0
- package/dist/filters/logic/localization/format_address.d.ts +13 -0
- package/dist/filters/logic/localization/format_address.js +51 -0
- package/dist/filters/logic/localization/index.d.ts +2 -0
- package/dist/filters/logic/localization/index.js +10 -0
- package/dist/filters/logic/math/abs.d.ts +1 -0
- package/dist/filters/logic/math/abs.js +9 -0
- package/dist/filters/logic/math/at_least.d.ts +1 -0
- package/dist/filters/logic/math/at_least.js +10 -0
- package/dist/filters/logic/math/at_most.d.ts +1 -0
- package/dist/filters/logic/math/at_most.js +10 -0
- package/dist/filters/logic/math/ceil.d.ts +1 -0
- package/dist/filters/logic/math/ceil.js +9 -0
- package/dist/filters/logic/math/divided_by.d.ts +1 -0
- package/dist/filters/logic/math/divided_by.js +10 -0
- package/dist/filters/logic/math/floor.d.ts +1 -0
- package/dist/filters/logic/math/floor.js +9 -0
- package/dist/filters/logic/math/index.d.ts +11 -0
- package/dist/filters/logic/math/index.js +28 -0
- package/dist/filters/logic/math/minus.d.ts +1 -0
- package/dist/filters/logic/math/minus.js +10 -0
- package/dist/filters/logic/math/modulo.d.ts +1 -0
- package/dist/filters/logic/math/modulo.js +10 -0
- package/dist/filters/logic/math/plus.d.ts +1 -0
- package/dist/filters/logic/math/plus.js +10 -0
- package/dist/filters/logic/math/round.d.ts +1 -0
- package/dist/filters/logic/math/round.js +10 -0
- package/dist/filters/logic/math/times.d.ts +1 -0
- package/dist/filters/logic/math/times.js +10 -0
- package/dist/filters/logic/media/external_video_tag.d.ts +11 -0
- package/dist/filters/logic/media/external_video_tag.js +16 -0
- package/dist/filters/logic/media/external_video_url.d.ts +6 -0
- package/dist/filters/logic/media/external_video_url.js +12 -0
- package/dist/filters/logic/media/image_tag.d.ts +11 -0
- package/dist/filters/logic/media/image_tag.js +30 -0
- package/dist/filters/logic/media/image_url.d.ts +9 -0
- package/dist/filters/logic/media/image_url.js +8 -0
- package/dist/filters/logic/media/index.d.ts +8 -0
- package/dist/filters/logic/media/index.js +22 -0
- package/dist/filters/logic/media/media_tag.d.ts +8 -0
- package/dist/filters/logic/media/media_tag.js +25 -0
- package/dist/filters/logic/media/model_viewer_tag.d.ts +7 -0
- package/dist/filters/logic/media/model_viewer_tag.js +14 -0
- package/dist/filters/logic/media/video_tag.d.ts +11 -0
- package/dist/filters/logic/media/video_tag.js +14 -0
- package/dist/filters/logic/syntax/echo.d.ts +1 -0
- package/dist/filters/logic/syntax/echo.js +8 -0
- package/dist/functions/set-optional-param.d.ts +1 -0
- package/dist/functions/set-optional-param.js +11 -0
- package/dist/globals/index.d.ts +1 -0
- package/dist/globals/index.js +3 -1
- package/dist/globals/logic/all_products.d.ts +7 -0
- package/dist/globals/logic/all_products.js +43 -0
- package/dist/graphql/index.d.ts +3 -0
- package/dist/graphql/index.js +40 -0
- package/dist/graphql/mutation/createCustomerAddresses.d.ts +2 -0
- package/dist/graphql/mutation/createCustomerAddresses.js +32 -0
- package/dist/graphql/mutation/customerLogin.d.ts +2 -0
- package/dist/graphql/mutation/customerLogin.js +11 -0
- package/dist/graphql/mutation/customerSignup.d.ts +2 -0
- package/dist/graphql/mutation/customerSignup.js +10 -0
- package/dist/graphql/mutation/customerVerifyOtp.d.ts +2 -0
- package/dist/graphql/mutation/customerVerifyOtp.js +13 -0
- package/dist/graphql/mutation/index.d.ts +5 -0
- package/dist/graphql/mutation/index.js +14 -0
- package/dist/graphql/query/findAllProducts.d.ts +2 -0
- package/dist/graphql/query/findAllProducts.js +93 -0
- package/dist/graphql/query/index.d.ts +2 -0
- package/dist/graphql/query/index.js +8 -0
- package/dist/index.local.d.ts +1 -0
- package/dist/index.local.js +11 -0
- package/dist/middleware/init.middleware.js +16 -0
- package/dist/middleware/locals.middleware.js +1 -1
- package/dist/middleware/prepareData.middleware.js +13 -17
- package/dist/middleware/render.middleware.js +6 -0
- package/dist/middleware/setGlobals.middleware.js +5 -0
- package/dist/middleware.d.ts +1 -1
- package/dist/middleware.js +33 -49
- package/dist/routers/dev/index.js +5 -0
- package/dist/routers/production/auth/index.d.ts +2 -0
- package/dist/routers/production/auth/index.js +16 -0
- package/dist/routers/production/auth/login/index.d.ts +2 -0
- package/dist/routers/production/auth/login/index.js +7 -0
- package/dist/routers/production/auth/logout/index.d.ts +2 -0
- package/dist/routers/production/auth/logout/index.js +8 -0
- package/dist/routers/production/auth/signup/index.d.ts +2 -0
- package/dist/routers/production/auth/signup/index.js +7 -0
- package/dist/routers/production/auth/verify/index.d.ts +2 -0
- package/dist/routers/production/auth/verify/index.js +7 -0
- package/dist/routers/production/cart/add/index.d.ts +2 -0
- package/dist/routers/production/cart/add/index.js +7 -0
- package/dist/routers/production/cart/index.d.ts +2 -0
- package/dist/routers/production/cart/index.js +12 -0
- package/dist/routers/production/cart/update/index.d.ts +2 -0
- package/dist/routers/production/cart/update/index.js +7 -0
- package/dist/routers/production/checkout/buy-now/index.d.ts +2 -0
- package/dist/routers/production/checkout/buy-now/index.js +7 -0
- package/dist/routers/production/checkout/create-order/index.d.ts +2 -0
- package/dist/routers/production/checkout/create-order/index.js +7 -0
- package/dist/routers/production/checkout/index.d.ts +2 -0
- package/dist/routers/production/checkout/index.js +12 -0
- package/dist/routers/production/index.d.ts +2 -0
- package/dist/routers/production/index.js +14 -0
- package/dist/routers/production/localize/currency/index.d.ts +2 -0
- package/dist/routers/production/localize/currency/index.js +7 -0
- package/dist/routers/production/localize/index.d.ts +2 -0
- package/dist/routers/production/localize/index.js +14 -0
- package/dist/routers/production/localize/lang/index.d.ts +2 -0
- package/dist/routers/production/localize/lang/index.js +7 -0
- package/dist/routers/production/localize/market/index.d.ts +2 -0
- package/dist/routers/production/localize/market/index.js +7 -0
- package/dist/utils/axios.d.ts +10 -0
- package/dist/utils/axios.js +25 -0
- package/dist/utils/client.d.ts +2 -0
- package/dist/utils/client.js +23 -0
- package/package.json +6 -1
- package/dist/controllers/auth/login.d.ts +0 -2
- package/dist/controllers/auth/login.js +0 -21
- package/dist/extensions/logic/form.js +0 -41
- package/dist/routers/index.js +0 -10
- /package/dist/controllers/auth/{logout.d.ts → logout.controller.d.ts} +0 -0
- /package/dist/controllers/auth/{logout.js → logout.controller.js} +0 -0
- /package/dist/routers/{index.d.ts → dev/index.d.ts} +0 -0
|
File without changes
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// import { registerService, initClient } from "node-consul-service";
|
|
3
|
+
// import { getLocalIP } from 'qumra-utils';
|
|
4
|
+
// // import logger from "./logger";
|
|
5
|
+
// // CONSUL_PORT=8500
|
|
6
|
+
// // CONSUL_SECURE=false
|
|
7
|
+
// // SERVICE_NAME=theme-service
|
|
8
|
+
// // SERVICE_ID=theme-service-1
|
|
9
|
+
// const consulHost = process.env.CONSUL_HOST;
|
|
10
|
+
// const consulPort = process.env.CONSUL_PORT ? parseInt(process.env.CONSUL_PORT, 10) : undefined;
|
|
11
|
+
// const consulSecure = process.env.CONSUL_SECURE === "true";
|
|
12
|
+
// initClient({
|
|
13
|
+
// host: consulHost,
|
|
14
|
+
// port: consulPort,
|
|
15
|
+
// secure: consulSecure,
|
|
16
|
+
// });
|
|
17
|
+
// export const register = async () => {
|
|
18
|
+
// const ipAddress = getLocalIP() || "localhost";
|
|
19
|
+
// const PORT = Number(process.env.PORT);
|
|
20
|
+
// if (process.env.NODE_ENV === "production") {
|
|
21
|
+
// const serviceName = process.env.SERVICE_NAME;
|
|
22
|
+
// const serviceId = process.env.SERVICE_ID;
|
|
23
|
+
// if (!serviceName || !serviceId) {
|
|
24
|
+
// logger.error("SERVICE_NAME and SERVICE_ID must be set in production mode.");
|
|
25
|
+
// return;
|
|
26
|
+
// }
|
|
27
|
+
// const config = {
|
|
28
|
+
// name: serviceName,
|
|
29
|
+
// id: serviceId,
|
|
30
|
+
// port: PORT,
|
|
31
|
+
// address: ipAddress,
|
|
32
|
+
// check: {
|
|
33
|
+
// name: `${serviceName} health check`,
|
|
34
|
+
// http: `http://${ipAddress}:${PORT}/health`,
|
|
35
|
+
// interval: "10m",
|
|
36
|
+
// timeout: "10s",
|
|
37
|
+
// },
|
|
38
|
+
// };
|
|
39
|
+
// try {
|
|
40
|
+
// await registerService(config);
|
|
41
|
+
// logger.info("Service registered with Consul");
|
|
42
|
+
// } catch (error) {
|
|
43
|
+
// logger.error("Failed to register service with Consul:", error);
|
|
44
|
+
// }
|
|
45
|
+
// }
|
|
46
|
+
// };
|
|
File without changes
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// import winston from 'winston';
|
|
3
|
+
// import path from 'path';
|
|
4
|
+
// // Define log format
|
|
5
|
+
// const logFormat = winston.format.combine(
|
|
6
|
+
// winston.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss' }),
|
|
7
|
+
// winston.format.errors({ stack: true }),
|
|
8
|
+
// winston.format.splat(),
|
|
9
|
+
// winston.format.json()
|
|
10
|
+
// );
|
|
11
|
+
// // Define log levels
|
|
12
|
+
// const levels = {
|
|
13
|
+
// error: 0,
|
|
14
|
+
// warn: 1,
|
|
15
|
+
// info: 2,
|
|
16
|
+
// http: 3,
|
|
17
|
+
// debug: 4,
|
|
18
|
+
// };
|
|
19
|
+
// // Define level based on environment
|
|
20
|
+
// const level = () => {
|
|
21
|
+
// const env = process.env.NODE_ENV || 'development';
|
|
22
|
+
// const isDevelopment = env === 'development';
|
|
23
|
+
// return isDevelopment ? 'debug' : 'warn';
|
|
24
|
+
// };
|
|
25
|
+
// // Define colors for each level
|
|
26
|
+
// const colors = {
|
|
27
|
+
// error: 'red',
|
|
28
|
+
// warn: 'yellow',
|
|
29
|
+
// info: 'green',
|
|
30
|
+
// http: 'magenta',
|
|
31
|
+
// debug: 'white',
|
|
32
|
+
// };
|
|
33
|
+
// // Add colors to winston
|
|
34
|
+
// winston.addColors(colors);
|
|
35
|
+
// // Create the logger
|
|
36
|
+
// const logger = winston.createLogger({
|
|
37
|
+
// level: level(),
|
|
38
|
+
// levels,
|
|
39
|
+
// format: logFormat,
|
|
40
|
+
// transports: [
|
|
41
|
+
// // Write all logs with level 'error' and below to 'error.log'
|
|
42
|
+
// new winston.transports.File({
|
|
43
|
+
// filename: path.join('logs', 'error.log'),
|
|
44
|
+
// level: 'error',
|
|
45
|
+
// maxsize: 5242880, // 5MB
|
|
46
|
+
// maxFiles: 5,
|
|
47
|
+
// }),
|
|
48
|
+
// // Write all logs with level 'info' and below to 'combined.log'
|
|
49
|
+
// new winston.transports.File({
|
|
50
|
+
// filename: path.join('logs', 'combined.log'),
|
|
51
|
+
// maxsize: 5242880, // 5MB
|
|
52
|
+
// maxFiles: 5,
|
|
53
|
+
// }),
|
|
54
|
+
// ],
|
|
55
|
+
// });
|
|
56
|
+
// // If we're not in production, log to the console with custom format
|
|
57
|
+
// if (process.env.NODE_ENV !== 'production') {
|
|
58
|
+
// logger.add(
|
|
59
|
+
// new winston.transports.Console({
|
|
60
|
+
// format: winston.format.combine(
|
|
61
|
+
// winston.format.colorize({ all: true }),
|
|
62
|
+
// winston.format.printf(
|
|
63
|
+
// (info) => `${info.timestamp} ${info.level}: ${info.message}`
|
|
64
|
+
// )
|
|
65
|
+
// ),
|
|
66
|
+
// })
|
|
67
|
+
// );
|
|
68
|
+
// }
|
|
69
|
+
// // Create a stream object for Morgan
|
|
70
|
+
// export const stream = {
|
|
71
|
+
// write: (message: string) => {
|
|
72
|
+
// logger.http(message.trim());
|
|
73
|
+
// },
|
|
74
|
+
// };
|
|
75
|
+
// export default logger;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.newCommentController = void 0;
|
|
4
|
+
const client_1 = require("../../utils/client");
|
|
5
|
+
const graphql_1 = require("../../graphql");
|
|
6
|
+
const newCommentController = async (req, res) => {
|
|
7
|
+
const { name, comment, email } = req.body;
|
|
8
|
+
const client = (0, client_1.getGqlClient)();
|
|
9
|
+
return client
|
|
10
|
+
.request(graphql_1.mutation.customerLogin, { input: { name, comment, email } })
|
|
11
|
+
.then((data) => {
|
|
12
|
+
console.log("dataauthrization", data);
|
|
13
|
+
const redirectUrl = req.get("referer") || "/";
|
|
14
|
+
res.redirect(redirectUrl);
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
exports.newCommentController = newCommentController;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.activateCustomerPasswordController = void 0;
|
|
4
|
+
const client_1 = require("../../utils/client");
|
|
5
|
+
const graphql_1 = require("../../graphql");
|
|
6
|
+
const activateCustomerPasswordController = async (req, res) => {
|
|
7
|
+
const { password, customerId } = req.body;
|
|
8
|
+
const client = (0, client_1.getGqlClient)();
|
|
9
|
+
return client
|
|
10
|
+
.request(graphql_1.mutation.customerLogin, { input: { password, customerId } })
|
|
11
|
+
.then((data) => {
|
|
12
|
+
console.log("dataauthrization", data);
|
|
13
|
+
res.cookie("authrization", data.token, {
|
|
14
|
+
httpOnly: false,
|
|
15
|
+
secure: process.env.NODE_ENV === "production",
|
|
16
|
+
expires: new Date(9999, 0, 1),
|
|
17
|
+
});
|
|
18
|
+
}).catch((err) => {
|
|
19
|
+
console.log(err);
|
|
20
|
+
}).finally(() => {
|
|
21
|
+
const redirectUrl = req.get("referer") || "/";
|
|
22
|
+
res.redirect(redirectUrl);
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
exports.activateCustomerPasswordController = activateCustomerPasswordController;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createCustomerController = void 0;
|
|
4
|
+
const client_1 = require("../../utils/client");
|
|
5
|
+
const graphql_1 = require("../../graphql");
|
|
6
|
+
const createCustomerController = async (req, res) => {
|
|
7
|
+
const { fullname, phone, country } = req.body;
|
|
8
|
+
const client = (0, client_1.getGqlClient)();
|
|
9
|
+
return client
|
|
10
|
+
.request(graphql_1.mutation.customerSignup, { input: { fullname, phone, country } })
|
|
11
|
+
.then((data) => {
|
|
12
|
+
res.cookie("token customerLogin", data.customerSignup.token, {
|
|
13
|
+
// httpOnly: false,
|
|
14
|
+
secure: process.env.NODE_ENV === "production",
|
|
15
|
+
expires: new Date(9999, 0, 1),
|
|
16
|
+
});
|
|
17
|
+
}).catch((err) => {
|
|
18
|
+
console.log(err);
|
|
19
|
+
}).finally(() => {
|
|
20
|
+
const redirectUrl = req.get("referer") || "/";
|
|
21
|
+
res.redirect(redirectUrl);
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
exports.createCustomerController = createCustomerController;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.customerAddressController = void 0;
|
|
4
|
+
const graphql_1 = require("../../graphql");
|
|
5
|
+
const client_1 = require("../../utils/client");
|
|
6
|
+
const customerAddressController = async (req, res) => {
|
|
7
|
+
const { phone, description, neighborhood, street, zipCode } = req.body;
|
|
8
|
+
const client = (0, client_1.getGqlClient)();
|
|
9
|
+
return client
|
|
10
|
+
.request(graphql_1.mutation.createCustomerAddresses, { input: { phone, description, neighborhood, street, zipCode } })
|
|
11
|
+
.then((data) => {
|
|
12
|
+
console.log("dataauthrization", data);
|
|
13
|
+
}).catch((err) => {
|
|
14
|
+
console.log(err);
|
|
15
|
+
}).finally(() => {
|
|
16
|
+
const redirectUrl = req.get("referer") || "/";
|
|
17
|
+
res.redirect(redirectUrl);
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
exports.customerAddressController = customerAddressController;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.customerLoginVerifyController = void 0;
|
|
4
|
+
const client_1 = require("../../utils/client");
|
|
5
|
+
const graphql_1 = require("../../graphql");
|
|
6
|
+
const customerLoginVerifyController = async (req, res) => {
|
|
7
|
+
const { otp } = req.body;
|
|
8
|
+
const token = req.cookies.token;
|
|
9
|
+
const client = (0, client_1.getGqlClient)();
|
|
10
|
+
return client
|
|
11
|
+
.request(graphql_1.mutation.customerVerifyOtp, { input: { token, otp } })
|
|
12
|
+
.then((data) => {
|
|
13
|
+
res.cookie("authrization", data.customerVerifyOtp.accessToken, {
|
|
14
|
+
secure: process.env.NODE_ENV === "production",
|
|
15
|
+
expires: new Date(9999, 0, 1),
|
|
16
|
+
});
|
|
17
|
+
const redirectUrl = req.get("referer") || "/";
|
|
18
|
+
res.redirect(redirectUrl);
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
exports.customerLoginVerifyController = customerLoginVerifyController;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.customerLoginController = void 0;
|
|
4
|
+
const client_1 = require("../../utils/client");
|
|
5
|
+
const graphql_1 = require("../../graphql");
|
|
6
|
+
const customerLoginController = async (req, res) => {
|
|
7
|
+
const { phone, country } = req.body;
|
|
8
|
+
const client = (0, client_1.getGqlClient)();
|
|
9
|
+
return client
|
|
10
|
+
.request(graphql_1.mutation.customerLogin, { input: { phone, country } })
|
|
11
|
+
.then((data) => {
|
|
12
|
+
res.cookie("token", data.customerLogin.token, {
|
|
13
|
+
secure: process.env.NODE_ENV === "production",
|
|
14
|
+
expires: new Date(9999, 0, 1),
|
|
15
|
+
});
|
|
16
|
+
}).catch((err) => {
|
|
17
|
+
console.log(err);
|
|
18
|
+
}).finally(() => {
|
|
19
|
+
const redirectUrl = req.get("referer") || "/";
|
|
20
|
+
res.redirect(redirectUrl);
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
exports.customerLoginController = customerLoginController;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.customerController = void 0;
|
|
4
|
+
const client_1 = require("../../utils/client");
|
|
5
|
+
const graphql_1 = require("../../graphql");
|
|
6
|
+
const customerController = async (req, res) => {
|
|
7
|
+
const { customerId } = req.body;
|
|
8
|
+
const client = (0, client_1.getGqlClient)();
|
|
9
|
+
return client
|
|
10
|
+
.request(graphql_1.mutation.customerLogin, { input: { customerId } })
|
|
11
|
+
.then((data) => {
|
|
12
|
+
console.log("dataauthrization", data);
|
|
13
|
+
res.cookie("authrization", data.token, {
|
|
14
|
+
httpOnly: false,
|
|
15
|
+
secure: process.env.NODE_ENV === "production",
|
|
16
|
+
expires: new Date(9999, 0, 1),
|
|
17
|
+
});
|
|
18
|
+
}).catch((err) => {
|
|
19
|
+
console.log(err);
|
|
20
|
+
}).finally(() => {
|
|
21
|
+
const redirectUrl = req.get("referer") || "/";
|
|
22
|
+
res.redirect(redirectUrl);
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
exports.customerController = customerController;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.guestLoginController = void 0;
|
|
4
|
+
const client_1 = require("../../utils/client");
|
|
5
|
+
const graphql_1 = require("../../graphql");
|
|
6
|
+
const guestLoginController = async (req, res) => {
|
|
7
|
+
const { sessionId } = req.body;
|
|
8
|
+
const client = (0, client_1.getGqlClient)();
|
|
9
|
+
return client
|
|
10
|
+
.request(graphql_1.mutation.customerLogin, { input: { sessionId } })
|
|
11
|
+
.then((data) => {
|
|
12
|
+
console.log("dataauthrization", data);
|
|
13
|
+
res.cookie("authrization", data.token, {
|
|
14
|
+
httpOnly: false,
|
|
15
|
+
secure: process.env.NODE_ENV === "production",
|
|
16
|
+
expires: new Date(9999, 0, 1),
|
|
17
|
+
});
|
|
18
|
+
}).catch((err) => {
|
|
19
|
+
console.log(err);
|
|
20
|
+
}).finally(() => {
|
|
21
|
+
const redirectUrl = req.get("referer") || "/";
|
|
22
|
+
res.redirect(redirectUrl);
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
exports.guestLoginController = guestLoginController;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.recoverCustomerPasswordController = void 0;
|
|
4
|
+
const client_1 = require("../../utils/client");
|
|
5
|
+
const graphql_1 = require("../../graphql");
|
|
6
|
+
const recoverCustomerPasswordController = async (req, res) => {
|
|
7
|
+
const appId = res.locals.app?._id;
|
|
8
|
+
const { code, newPassword } = req.body;
|
|
9
|
+
const client = (0, client_1.getGqlClient)();
|
|
10
|
+
return client
|
|
11
|
+
.request(graphql_1.mutation.customerLogin, { input: { code, newPassword } })
|
|
12
|
+
.then((data) => {
|
|
13
|
+
console.log("dataauthrization", data);
|
|
14
|
+
res.cookie("authrization", data.token, {
|
|
15
|
+
httpOnly: false,
|
|
16
|
+
secure: process.env.NODE_ENV === "production",
|
|
17
|
+
expires: new Date(9999, 0, 1),
|
|
18
|
+
});
|
|
19
|
+
}).catch((err) => {
|
|
20
|
+
console.log(err);
|
|
21
|
+
}).finally(() => {
|
|
22
|
+
const redirectUrl = req.get("referer") || "/";
|
|
23
|
+
res.redirect(redirectUrl);
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
exports.recoverCustomerPasswordController = recoverCustomerPasswordController;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resetCustomerPasswordController = void 0;
|
|
4
|
+
const client_1 = require("../../utils/client");
|
|
5
|
+
const graphql_1 = require("../../graphql");
|
|
6
|
+
const resetCustomerPasswordController = async (req, res) => {
|
|
7
|
+
const { redirect_url, token } = req.query;
|
|
8
|
+
const { code, newPassword } = req.body;
|
|
9
|
+
const client = (0, client_1.getGqlClient)();
|
|
10
|
+
return client
|
|
11
|
+
.request(graphql_1.mutation.customerLogin, { input: { code, newPassword } }).then((data) => {
|
|
12
|
+
console.log("dataauthrization", data);
|
|
13
|
+
res.cookie("authrization", data.token, {
|
|
14
|
+
httpOnly: false,
|
|
15
|
+
secure: process.env.NODE_ENV === "production",
|
|
16
|
+
expires: new Date(9999, 0, 1),
|
|
17
|
+
});
|
|
18
|
+
}).catch((err) => {
|
|
19
|
+
console.log(err);
|
|
20
|
+
}).finally(() => {
|
|
21
|
+
const redirectUrl = req.get("referer") || "/";
|
|
22
|
+
res.redirect(redirectUrl);
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
exports.resetCustomerPasswordController = resetCustomerPasswordController;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.storefrontPasswordController = void 0;
|
|
4
|
+
const client_1 = require("../../utils/client");
|
|
5
|
+
const graphql_1 = require("../../graphql");
|
|
6
|
+
const storefrontPasswordController = async (req, res) => {
|
|
7
|
+
const { storefrontPassword } = req.body;
|
|
8
|
+
const client = (0, client_1.getGqlClient)();
|
|
9
|
+
return client
|
|
10
|
+
.request(graphql_1.mutation.customerLogin, { input: { storefrontPassword } })
|
|
11
|
+
.then((data) => {
|
|
12
|
+
console.log("dataauthrization", data);
|
|
13
|
+
res.cookie("authrization", data.token, {
|
|
14
|
+
httpOnly: false,
|
|
15
|
+
secure: process.env.NODE_ENV === "production",
|
|
16
|
+
expires: new Date(9999, 0, 1),
|
|
17
|
+
});
|
|
18
|
+
}).catch((err) => {
|
|
19
|
+
console.log(err);
|
|
20
|
+
}).finally(() => {
|
|
21
|
+
const redirectUrl = req.get("referer") || "/";
|
|
22
|
+
res.redirect(redirectUrl);
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
exports.storefrontPasswordController = storefrontPasswordController;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addToCartController = void 0;
|
|
4
|
+
const client_1 = require("../../utils/client");
|
|
5
|
+
const graphql_1 = require("../../graphql");
|
|
6
|
+
const addToCartController = async (req, res) => {
|
|
7
|
+
const { id, quantity } = req.body;
|
|
8
|
+
const client = (0, client_1.getGqlClient)();
|
|
9
|
+
return client
|
|
10
|
+
.request(graphql_1.mutation.customerLogin, { input: { id, quantity } })
|
|
11
|
+
.then((data) => {
|
|
12
|
+
console.log("dataauthrization", data);
|
|
13
|
+
}).catch((err) => {
|
|
14
|
+
console.log(err);
|
|
15
|
+
}).finally(() => {
|
|
16
|
+
const redirectUrl = req.get("referer") || "/";
|
|
17
|
+
res.redirect(redirectUrl);
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
exports.addToCartController = addToCartController;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateCartController = void 0;
|
|
4
|
+
const client_1 = require("../../utils/client");
|
|
5
|
+
const graphql_1 = require("../../graphql");
|
|
6
|
+
const updateCartController = async (req, res) => {
|
|
7
|
+
const { updates, update, checkout } = req.body;
|
|
8
|
+
if (checkout) {
|
|
9
|
+
return res.redirect("/checkout");
|
|
10
|
+
}
|
|
11
|
+
const items = (updates || []).map((quantity, index) => ({
|
|
12
|
+
id: `item_${index}`,
|
|
13
|
+
quantity: Number(quantity),
|
|
14
|
+
}));
|
|
15
|
+
const client = (0, client_1.getGqlClient)();
|
|
16
|
+
return client
|
|
17
|
+
.request(graphql_1.mutation.customerLogin, { input: { updates, update, checkout } })
|
|
18
|
+
.then((data) => {
|
|
19
|
+
}).catch((err) => {
|
|
20
|
+
console.log(err);
|
|
21
|
+
}).finally(() => {
|
|
22
|
+
const redirectUrl = req.get("referer") || "/";
|
|
23
|
+
res.redirect(redirectUrl);
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
exports.updateCartController = updateCartController;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkoutController = void 0;
|
|
4
|
+
const client_1 = require("../../utils/client");
|
|
5
|
+
const graphql_1 = require("../../graphql");
|
|
6
|
+
const checkoutController = async (req, res) => {
|
|
7
|
+
try {
|
|
8
|
+
const cartId = res.locals.render.globals?.cart?._id;
|
|
9
|
+
const client = (0, client_1.getGqlClient)();
|
|
10
|
+
return client
|
|
11
|
+
.request(graphql_1.mutation.customerLogin, { input: { cartId } })
|
|
12
|
+
.then((data) => {
|
|
13
|
+
console.log("dataauthrization", data);
|
|
14
|
+
const redirectUrl = req.get("referer") || "/";
|
|
15
|
+
res.redirect(redirectUrl);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
console.error("❌ Error in checkoutController:", error);
|
|
20
|
+
res.status(500).send("حدث خطأ أثناء تنفيذ عملية الدفع.");
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.checkoutController = checkoutController;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.contactController = void 0;
|
|
4
|
+
const client_1 = require("../../utils/client");
|
|
5
|
+
const graphql_1 = require("../../graphql");
|
|
6
|
+
const contactController = async (req, res) => {
|
|
7
|
+
const { name, email, message } = req.body;
|
|
8
|
+
const client = (0, client_1.getGqlClient)();
|
|
9
|
+
return client
|
|
10
|
+
.request(graphql_1.mutation.customerLogin, { input: { name, email, message } })
|
|
11
|
+
.then((data) => {
|
|
12
|
+
console.log("dataauthrization", data);
|
|
13
|
+
}).catch((err) => {
|
|
14
|
+
console.log(err);
|
|
15
|
+
}).finally(() => {
|
|
16
|
+
const redirectUrl = req.get("referer") || "/";
|
|
17
|
+
res.redirect(redirectUrl);
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
exports.contactController = contactController;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.currencyController = void 0;
|
|
4
|
+
const currencyController = async (req, res) => {
|
|
5
|
+
const { currency } = req.body;
|
|
6
|
+
if (!currency) {
|
|
7
|
+
return res.status(400).send("Missing redirect_url");
|
|
8
|
+
}
|
|
9
|
+
res.cookie("currency", currency, {
|
|
10
|
+
// httpOnly: false,
|
|
11
|
+
secure: process.env.NODE_ENV === "production",
|
|
12
|
+
expires: new Date(9999, 0, 1),
|
|
13
|
+
});
|
|
14
|
+
const redirectUrl = req.get("referer") || "/";
|
|
15
|
+
res.redirect(redirectUrl);
|
|
16
|
+
};
|
|
17
|
+
exports.currencyController = currencyController;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.langController = void 0;
|
|
4
|
+
const langController = async (req, res) => {
|
|
5
|
+
const { lang } = req.body;
|
|
6
|
+
console.log("🚀 ~ langController ~ req.body:", req.body);
|
|
7
|
+
if (!lang) {
|
|
8
|
+
return res.status(400).send("Missing redirect_url");
|
|
9
|
+
}
|
|
10
|
+
res.cookie("lang", lang, {
|
|
11
|
+
// httpOnly: false,
|
|
12
|
+
secure: process.env.NODE_ENV === "production",
|
|
13
|
+
expires: new Date(9999, 0, 1),
|
|
14
|
+
});
|
|
15
|
+
const redirectUrl = req.get("referer") || "/";
|
|
16
|
+
res.redirect(redirectUrl);
|
|
17
|
+
};
|
|
18
|
+
exports.langController = langController;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.marketController = void 0;
|
|
4
|
+
const marketController = async (req, res) => {
|
|
5
|
+
const { market } = req.body;
|
|
6
|
+
if (!market) {
|
|
7
|
+
return res.status(400).send("Missing redirect_url");
|
|
8
|
+
}
|
|
9
|
+
res.cookie("market", market, {
|
|
10
|
+
// httpOnly: false,
|
|
11
|
+
secure: process.env.NODE_ENV === "production",
|
|
12
|
+
expires: new Date(9999, 0, 1),
|
|
13
|
+
});
|
|
14
|
+
const redirectUrl = req.get("referer") || "/";
|
|
15
|
+
res.redirect(redirectUrl);
|
|
16
|
+
};
|
|
17
|
+
exports.marketController = marketController;
|