d8a1e94b37fc93b64e8aa741e08192ae76cdab31
[motion2.git] / server / services / ami / fax / rpcDb.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 _0x009d=['../rpc/faxAccount','error','inspect','notify','resolve','[Notify]\x20','util','preview'];(function(_0x3c4a7c,_0x2f4e3c){var _0xf13d1e=function(_0x24cb78){while(--_0x24cb78){_0x3c4a7c['push'](_0x3c4a7c['shift']());}};_0xf13d1e(++_0x2f4e3c);}(_0x009d,0x1ee));var _0xd009=function(_0x49e123,_0x547830){_0x49e123=_0x49e123-0x0;var _0x1528cf=_0x009d[_0x49e123];return _0x1528cf;};'use strict';var util=require(_0xd009('0x0'));var BPromise=require('bluebird');var logger=require('../../../config/logger')(_0xd009('0x1'));var _=require('lodash');var faxAccount=require(_0xd009('0x2'));function loggerCatch(_0xcfca0){return function(_0x3493e0){logger[_0xd009('0x3')](_0xcfca0,util[_0xd009('0x4')](_0x3493e0,{'showHidden':![],'depth':null}));};}exports[_0xd009('0x5')]=function(_0x106558,_0x52c1bf){return BPromise[_0xd009('0x6')]()['then'](faxAccount[_0xd009('0x5')](_0x106558,_0x52c1bf))['catch'](loggerCatch(_0xd009('0x7')));};