Built motion from commit e02f907f.|2.6.14
[motion2.git] / server / api / interval / 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 _0x15c6=['exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','get','isAuthenticated','index','/:id','show','post','create','addInterval','/:id/sub_intervals/create_many','delete','destroy'];(function(_0x33fa36,_0x25c064){var _0x9ab83b=function(_0x2df16f){while(--_0x2df16f){_0x33fa36['push'](_0x33fa36['shift']());}};_0x9ab83b(++_0x25c064);}(_0x15c6,0x1cd));var _0x615c=function(_0x1c08f6,_0x14c077){_0x1c08f6=_0x1c08f6-0x0;var _0xbc156a=_0x15c6[_0x1c08f6];return _0xbc156a;};'use strict';var multer=require(_0x615c('0x0'));var util=require(_0x615c('0x1'));var path=require(_0x615c('0x2'));var timeout=require(_0x615c('0x3'));var express=require(_0x615c('0x4'));var router=express[_0x615c('0x5')]();var fs_extra=require(_0x615c('0x6'));var auth=require(_0x615c('0x7'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./interval.controller');router[_0x615c('0x8')]('/',auth[_0x615c('0x9')](),controller[_0x615c('0xa')]);router['get'](_0x615c('0xb'),auth[_0x615c('0x9')](),controller[_0x615c('0xc')]);router[_0x615c('0x8')]('/:id/sub_intervals',auth[_0x615c('0x9')](),controller['getIntervals']);router[_0x615c('0xd')]('/',auth[_0x615c('0x9')](),controller[_0x615c('0xe')]);router[_0x615c('0xd')]('/:id/sub_intervals',auth['isAuthenticated'](),controller[_0x615c('0xf')]);router[_0x615c('0xd')](_0x615c('0x10'),auth[_0x615c('0x9')](),controller['addIntervals']);router['put'](_0x615c('0xb'),auth[_0x615c('0x9')](),controller['update']);router[_0x615c('0x11')]('/:id',auth['isAuthenticated'](),controller[_0x615c('0x12')]);module[_0x615c('0x13')]=router;