fa8368707032da071b780eaff90f7514b55ae1f7
[motion2.git] / server / api / cmCompany / 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 _0x9d52=['put','/:id','update','delete','destroy','exports','multer','path','connect-timeout','express','Router','../../config/environment','./cmCompany.controller','get','isAuthenticated','/describe','describe','show','/:id/contacts','post'];(function(_0x3b7202,_0x1a44fc){var _0xf96fe5=function(_0x26168a){while(--_0x26168a){_0x3b7202['push'](_0x3b7202['shift']());}};_0xf96fe5(++_0x1a44fc);}(_0x9d52,0x10a));var _0x29d5=function(_0x32d330,_0xe907c8){_0x32d330=_0x32d330-0x0;var _0xe81a43=_0x9d52[_0x32d330];return _0xe81a43;};'use strict';var multer=require(_0x29d5('0x0'));var util=require('util');var path=require(_0x29d5('0x1'));var timeout=require(_0x29d5('0x2'));var express=require(_0x29d5('0x3'));var router=express[_0x29d5('0x4')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x29d5('0x5'));var controller=require(_0x29d5('0x6'));router[_0x29d5('0x7')]('/',auth[_0x29d5('0x8')](),controller['index']);router['get'](_0x29d5('0x9'),auth['isAuthenticated'](),controller[_0x29d5('0xa')]);router['get']('/:id',auth[_0x29d5('0x8')](),controller[_0x29d5('0xb')]);router[_0x29d5('0x7')](_0x29d5('0xc'),auth[_0x29d5('0x8')](),controller['getContacts']);router[_0x29d5('0xd')]('/',auth[_0x29d5('0x8')](),controller['create']);router[_0x29d5('0xd')]('/:id/contacts',auth[_0x29d5('0x8')](),controller['addContacts']);router[_0x29d5('0xe')](_0x29d5('0xf'),auth[_0x29d5('0x8')](),controller[_0x29d5('0x10')]);router[_0x29d5('0x11')]('/:id',auth[_0x29d5('0x8')](),controller[_0x29d5('0x12')]);module[_0x29d5('0x13')]=router;