6d16ab776653507e6bf9fd807f4366b7b46693bf
[motion2.git] / server / api / chatMessage / 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 _0x41cb=['/:id','update','put','accept','/:id/reject','reject','multer','util','path','Router','../../components/auth/service','../../config/environment','./chatMessage.controller','isAuthenticated','index','get','/describe','describe','show','chat','chatmessage:create','create'];(function(_0x55e08b,_0x421620){var _0xd1a7ff=function(_0x58c7ff){while(--_0x58c7ff){_0x55e08b['push'](_0x55e08b['shift']());}};_0xd1a7ff(++_0x421620);}(_0x41cb,0xa0));var _0xb41c=function(_0x4043be,_0x33604e){_0x4043be=_0x4043be-0x0;var _0x30e2ae=_0x41cb[_0x4043be];return _0x30e2ae;};'use strict';var multer=require(_0xb41c('0x0'));var util=require(_0xb41c('0x1'));var path=require(_0xb41c('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0xb41c('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0xb41c('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0xb41c('0x5'));var controller=require(_0xb41c('0x6'));router['get']('/',auth[_0xb41c('0x7')](),controller[_0xb41c('0x8')]);router[_0xb41c('0x9')](_0xb41c('0xa'),auth[_0xb41c('0x7')](),controller[_0xb41c('0xb')]);router['get']('/:id',auth['isAuthenticated'](),controller[_0xb41c('0xc')]);router['post']('/',auth[_0xb41c('0x7')](),interaction['tracked'](_0xb41c('0xd'),_0xb41c('0xe')),controller[_0xb41c('0xf')]);router['put'](_0xb41c('0x10'),controller[_0xb41c('0x11')]);router[_0xb41c('0x12')]('/:id/accept',auth['isAuthenticated'](),controller[_0xb41c('0x13')]);router[_0xb41c('0x12')](_0xb41c('0x14'),auth['isAuthenticated'](),controller[_0xb41c('0x15')]);router['delete'](_0xb41c('0x10'),auth[_0xb41c('0x7')](),controller['destroy']);module['exports']=router;