Skip to content

Commit

Permalink
console.log process.env
Browse files Browse the repository at this point in the history
  • Loading branch information
hassanelnajjar committed Jul 12, 2023
1 parent 5f96015 commit a7f62eb
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion heroku.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ build:
docker:
web: Dockerfile
config:
SHOPIFY_API_KEY: <SHOPIFY_API_KEY>
SHOPIFY_API_KEY: <SHOPIFY_API_KEY>
2 changes: 1 addition & 1 deletion web/fdc-modules/orders/controllers/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Router} from 'express';
import { Router } from 'express';

import retrieveOrder from './retrieve-order.js';
import convertFDCRequestFromJSON from '../../../middleware/convertFDCRequestFromJSON.js';
Expand Down
5 changes: 2 additions & 3 deletions web/fdc-modules/orders/use-cases/create-order.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Shopify from '../../../fdc-repositories/shopify/index.js';

const createOrder = async ({order, shopName, accessToken}) => {
const createOrder = async ({ order, shopName, accessToken }) => {
const inventoryLevels = await Shopify.checkInventory({
lineItems: order.lineItems,
accessToken,
Expand All @@ -20,8 +20,7 @@ const createOrder = async ({order, shopName, accessToken}) => {

const availableLineItems = order.lineItems.filter((lineItem) => {
const inventoryLevel = availableInventoryLevels.find(
(inventoryLevel) =>
inventoryLevel.inventory_item_id === lineItem.inventory_item_id
(p) => p.inventory_item_id === lineItem.inventory_item_id
);

return inventoryLevel;
Expand Down
2 changes: 1 addition & 1 deletion web/fdc-modules/products/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ import Controllers from './controllers/index.js';
import UseCases from './use-cases/index.js';
import Repositories from '../../fdc-repositories/index.js';

export default {Controllers, UseCases, Repositories};
export default { Controllers, UseCases, Repositories };
4 changes: 2 additions & 2 deletions web/fdc-modules/products/use-cases/get-products.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Shopify from '../../../fdc-repositories/shopify/index.js';

const getProducts = async ({session}) => {
const products = await Shopify.getProducts({session});
const getProducts = async ({ session }) => {
const products = await Shopify.getProducts({ session });
return products;
};

Expand Down
2 changes: 2 additions & 0 deletions web/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
console.log('process.env', process.env);

import app from './app.js';

const port = process.env.BACKEND_PORT || process.env.PORT || '3000';
Expand Down

0 comments on commit a7f62eb

Please sign in to comment.