Skip to content

Commit

Permalink
chore(example): remove unnecessary files (#228)
Browse files Browse the repository at this point in the history
- remove unwanted and redundant files
- remove unused and borken imports
  • Loading branch information
ajimae committed Mar 23, 2022
1 parent c9c20a2 commit 6274563
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 644 deletions.
2 changes: 1 addition & 1 deletion examples/me/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ These credentials can be gotten from the commercetools [merchant center](https:/

### Note

Ensure there are products and at least a customer already enlisted and registered respectively within the project being used.
Ensure there are products and at least a customer already enlisted and registered respectively within the project being used, if you don't please follow this [link](https://github.com/commercetools/commercetools-sunrise-data) for further instructions.
84 changes: 0 additions & 84 deletions examples/me/server/src/middleware/auth.ts

This file was deleted.

4 changes: 0 additions & 4 deletions examples/me/server/src/middleware/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import Validator from "./Validator";
import { isAuthenticated, authenticateUser, invalidateToken } from './auth'

export {
Validator,
isAuthenticated,
authenticateUser,
invalidateToken
}
1 change: 0 additions & 1 deletion examples/me/server/src/routes/cart.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Router } from 'express'
import { CartController } from '../controller'
import { isAuthenticated } from '../middleware'

// build the client
const cartController = new CartController()
Expand Down
1 change: 0 additions & 1 deletion examples/me/server/src/routes/customer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Router } from 'express'
import { CustomerController } from '../controller'
import { Validator } from '../middleware'
import { authenticateUser, invalidateToken } from '../middleware'

const customerController = new CustomerController()

Expand Down
12 changes: 0 additions & 12 deletions examples/me/server/src/routes/product.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
import { Router } from 'express'
import { ProductController } from '../controller'
import ApiRoot from '../client/Client'

// build the client
const options = {
projectKey: process.env.CTP_PROJECT_KEY || '',
oauthUri: 'https://auth.europe-west1.gcp.commercetools.com',
baseUri: 'https://api.europe-west1.gcp.commercetools.com',
credentials: {
clientId: process.env.CTP_CLIENT_ID || '',
clientSecret: process.env.CTP_CLIENT_SECRET || '',
},
}

const productController = new ProductController()

Expand Down

0 comments on commit 6274563

Please sign in to comment.