Built motion from commit (unavailable).|2.5.23
[motion2.git] / server / api / userProfile / userProfile.model.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 _0xe9ad=['User','update','privacyEnabled','then','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./userProfile.attributes','exports','define','UserProfile','models'];(function(_0x206294,_0x548481){var _0x124151=function(_0x2598bd){while(--_0x2598bd){_0x206294['push'](_0x206294['shift']());}};_0x124151(++_0x548481);}(_0xe9ad,0x82));var _0xde9a=function(_0x3fab8d,_0x3a43e0){_0x3fab8d=_0x3fab8d-0x0;var _0x652a13=_0xe9ad[_0x3fab8d];return _0x652a13;};'use strict';var _=require(_0xde9a('0x0'));var util=require(_0xde9a('0x1'));var logger=require(_0xde9a('0x2'))(_0xde9a('0x3'));var moment=require(_0xde9a('0x4'));var BPromise=require(_0xde9a('0x5'));var rp=require(_0xde9a('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0xde9a('0x7'));var config=require(_0xde9a('0x8'));var attributes=require(_0xde9a('0x9'));module[_0xde9a('0xa')]=function(_0x5290c5,_0x27b380){return _0x5290c5[_0xde9a('0xb')](_0xde9a('0xc'),attributes,{'tableName':'user_profiles','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x45d4a7,_0x17f89b,_0x30e166){var _0x1fac02=_0x5290c5[_0xde9a('0xd')];_0x1fac02[_0xde9a('0xe')][_0xde9a('0xf')]({'privacyEnabled':_0x45d4a7[_0xde9a('0x10')]},{'where':{'UserProfileId':_0x45d4a7['id']}})[_0xde9a('0x11')](function(){_0x30e166();})['catch'](function(_0x1dad41){_0x30e166(_0x1dad41);});}}});};