Skip to content

Commit

Permalink
fix: sheets api issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Labham-Jain committed Nov 2, 2023
1 parent 6ad758b commit c277166
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
14 changes: 7 additions & 7 deletions src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import {
} from "medusa-core-utils";
import { ConfigModule } from "@medusajs/medusa";
import cors from 'cors'
import { deleteCustomer } from "./routes/delete-customer";
import { listDeletedCustomers } from "./routes/list-deleted";
import { restoreCustomer } from "./routes/restore-customer";
import { deleteCustomer } from "./routes/admin/delete-customer";
import { listDeletedCustomers } from "./routes/admin/list-deleted";
import { restoreCustomer } from "./routes/admin/restore-customer";
import { uploadFile } from "./routes/global/uploads";
import { S3Client } from "@aws-sdk/client-s3";
import { SheetsRouter } from "./routes/sheets";
import { SheetsSyncCategoriesRouter } from "./routes/sheets/sync-categories";
import { SheetsSyncLocationsRouter } from "./routes/sheets/sync-locations";
import { SheetsSyncProductsRouter } from "./routes/sheets/sync-products";
import { SheetsRouter } from "./routes/admin/sheets";
import { SheetsSyncCategoriesRouter } from "./routes/admin/sheets/sync-categories";
import { SheetsSyncLocationsRouter } from "./routes/admin/sheets/sync-locations";
import { SheetsSyncProductsRouter } from "./routes/admin/sheets/sync-products";

export default (rootDirectory: string): Router | Router[] => {
const { configModule: { projectConfig } } = getConfigFile<ConfigModule>(rootDirectory, "medusa-config")
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { authenticate } from "@medusajs/medusa"
import { Router } from "express";
import CustomerService from "../../services/customer";
import CustomerService from "../../../services/customer";

export const listDeletedCustomers = (router: Router) => {
router.use('/admin/customers/list-deleted', authenticate());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { authenticate } from "@medusajs/medusa"
import express, { Router } from "express";
import CustomerService from "../../services/customer";
import CustomerService from "../../../services/customer";

export const restoreCustomer = (router: Router) => {
router.use('/admin/customers/restore', express.json(), authenticate());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ProductOption, ProductStatus, authenticate } from "@medusajs/medusa"
import express, { Router } from "express";
import CategoryService from "../../../services/category";
import GoogleSheetAPIService, { ProductData } from "../../../services/google-sheet-api";
import ProductService from "../../../services/product";
import CategoryService from "../../../../services/category";
import GoogleSheetAPIService, { ProductData } from "../../../../services/google-sheet-api";
import ProductService from "../../../../services/product";
import { mapSheetProduct } from "./helpers/mapSheetProduct";

type CategoriesID = { id: string }[];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { authenticate } from "@medusajs/medusa"
import express, { Router } from "express";
import CategoryService from "../../../services/category";
import GoogleSheetAPIService from "../../../services/google-sheet-api";
import CategoryService from "../../../../services/category";
import GoogleSheetAPIService from "../../../../services/google-sheet-api";


export const SheetsSyncCategoriesRouter = (router: Router) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { authenticate } from "@medusajs/medusa";
import express, { Router } from "express";
import CategoryService from "../../../services/category";
import GoogleSheetAPIService from "../../../services/google-sheet-api";
import CategoryService from "../../../../services/category";
import GoogleSheetAPIService from "../../../../services/google-sheet-api";


export const SheetsSyncLocationsRouter = (router: Router) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { authenticate } from "@medusajs/medusa"
import express, { Router } from "express";
import GoogleSheetAPIService from "../../../services/google-sheet-api";
import ProductService from "../../../services/product";
import GoogleSheetAPIService from "../../../../services/google-sheet-api";
import ProductService from "../../../../services/product";


export const SheetsSyncProductsRouter = (router: Router) => {
Expand Down

0 comments on commit c277166

Please sign in to comment.