const { Router }     = require('express')
const authRoutes     = require('./authentication')
const usersRoutes    = require('./users')
const authMiddleware = require('./../middlewares/authentication')

const api = (app) => {
  let api = Router()

  api.use(authMiddleware)

  api.get('/', (req, res) => {
    res.status(200).send({ 'user': req.currentUser })
  })

  authRoutes(api)
  usersRoutes(api)

  return api
}

module.exports = api

const { Router }     = require('express')
const authRoutes     = require('./authentication')
const usersRoutes    = require('./users')
const customerRoutes = require('./customers')
const authMiddleware = require('./../middlewares/authentication')

const api = (app) => {
  let api = Router()

  api.use(authMiddleware)

  api.get('/', (req, res) => {
    res.status(200).send({ 'status': 'OK' })
  })

  authRoutes(api)
  usersRoutes(api)
  customerRoutes(api)

  return api
}

module.exports = api

Remove current user data from response and user customer routes
Remove current user data from response and user customer routes
