5658aabc53134166ad2b202c9f15de43bacd417c
[motion2.git] / server / api / squareOdbc / index.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x77f4=['/:id','delete','destroy','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','show','15s','test','post','put'];(function(_0x47fd17,_0x4f7037){var _0x353a4b=function(_0x16badc){while(--_0x16badc){_0x47fd17['push'](_0x47fd17['shift']());}};_0x353a4b(++_0x4f7037);}(_0x77f4,0x9b));var _0x477f=function(_0x1fff85,_0x48d856){_0x1fff85=_0x1fff85-0x0;var _0x3e0edd=_0x77f4[_0x1fff85];return _0x3e0edd;};'use strict';var multer=require('multer');var util=require(_0x477f('0x0'));var path=require(_0x477f('0x1'));var timeout=require(_0x477f('0x2'));var express=require(_0x477f('0x3'));var router=express[_0x477f('0x4')]();var fs_extra=require(_0x477f('0x5'));var auth=require(_0x477f('0x6'));var interaction=require(_0x477f('0x7'));var config=require('../../config/environment');var controller=require('./squareOdbc.controller');router[_0x477f('0x8')]('/',auth[_0x477f('0x9')](),controller[_0x477f('0xa')]);router[_0x477f('0x8')]('/:id',auth[_0x477f('0x9')](),controller[_0x477f('0xb')]);router[_0x477f('0x8')]('/:id/test',auth[_0x477f('0x9')](),timeout(_0x477f('0xc')),controller[_0x477f('0xd')]);router[_0x477f('0xe')]('/',auth['isAuthenticated'](),controller['create']);router[_0x477f('0xf')](_0x477f('0x10'),auth[_0x477f('0x9')](),controller['update']);router[_0x477f('0x11')](_0x477f('0x10'),auth[_0x477f('0x9')](),controller[_0x477f('0x12')]);module['exports']=router;