@webex/internal-plugin-avatar
Advanced tools
Comparing version 1.66.2 to 1.69.0
@@ -27,6 +27,8 @@ 'use strict'; | ||
var _avatarUrlBatcher = require('./avatar-url-batcher'); | ||
var _common = require('@webex/common'); | ||
var _avatarUrlBatcher2 = _interopRequireDefault(_avatarUrlBatcher); | ||
var _helperImage = require('@webex/helper-image'); | ||
var _webexCore = require('@webex/webex-core'); | ||
var _avatarUrlStore = require('./avatar-url-store'); | ||
@@ -36,8 +38,6 @@ | ||
var _common = require('@webex/common'); | ||
var _avatarUrlBatcher = require('./avatar-url-batcher'); | ||
var _helperImage = require('@webex/helper-image'); | ||
var _avatarUrlBatcher2 = _interopRequireDefault(_avatarUrlBatcher); | ||
var _webexCore = require('@webex/webex-core'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -181,7 +181,7 @@ | ||
}); | ||
}).then(function (file) { | ||
}).then(function (processedImage) { | ||
return _this4.upload({ | ||
api: 'avatar', | ||
resource: 'profile', | ||
file: file[0], | ||
resource: 'profile/' + _this4.webex.internal.device.userId + '/session', | ||
file: processedImage[0], | ||
phases: { | ||
@@ -196,8 +196,7 @@ upload: { | ||
api: 'avatar', | ||
// eslint-disable-next-line no-unused-vars | ||
$resource: function $resource(session) { | ||
return 'profile/' + session.id; | ||
}, | ||
$body: function $body(session) { | ||
return session; | ||
return ( | ||
// eslint-disable-next-line max-len | ||
'profile/' + _this4.webex.internal.device.userId + '/session/' + session.id | ||
); | ||
} | ||
@@ -214,3 +213,3 @@ } | ||
}, | ||
version: '1.66.2' | ||
version: '1.69.0' | ||
}, (_applyDecoratedDescriptor(_obj, '_fetchAllAvatarUrlSizes', [_dec], (0, _getOwnPropertyDescriptor2.default)(_obj, '_fetchAllAvatarUrlSizes'), _obj), _applyDecoratedDescriptor(_obj, '_fetchAvatarUrl', [_dec2], (0, _getOwnPropertyDescriptor2.default)(_obj, '_fetchAvatarUrl'), _obj)), _obj))); | ||
@@ -217,0 +216,0 @@ |
{ | ||
"name": "@webex/internal-plugin-avatar", | ||
"version": "1.66.2", | ||
"version": "1.69.0", | ||
"description": "", | ||
@@ -21,6 +21,6 @@ "license": "MIT", | ||
"lodash": "^4.17.11", | ||
"@webex/common": "1.66.2", | ||
"@webex/helper-image": "1.66.2", | ||
"@webex/webex-core": "1.66.2", | ||
"@webex/common": "1.66.2", | ||
"@webex/common-timers": "1.66.2", | ||
"@webex/helper-image": "1.66.2", | ||
"@webex/internal-plugin-user": "1.66.2", | ||
@@ -27,0 +27,0 @@ "@webex/internal-plugin-wdm": "1.66.2", |
@@ -5,4 +5,2 @@ /*! | ||
import AvatarUrlBatcher from './avatar-url-batcher'; | ||
import AvatarUrlStore from './avatar-url-store'; | ||
import {oneFlight} from '@webex/common'; | ||
@@ -13,2 +11,5 @@ import {detectFileType, processImage} from '@webex/helper-image'; | ||
import AvatarUrlStore from './avatar-url-store'; | ||
import AvatarUrlBatcher from './avatar-url-batcher'; | ||
const Avatar = WebexPlugin.extend({ | ||
@@ -110,11 +111,9 @@ namespace: 'Avatar', | ||
})) | ||
.then((file) => this.upload({ | ||
.then((processedImage) => this.upload({ | ||
api: 'avatar', | ||
resource: 'profile', | ||
file: file[0], | ||
resource: `profile/${this.webex.internal.device.userId}/session`, | ||
file: processedImage[0], | ||
phases: { | ||
upload: { | ||
$uri: function $uri(session) { | ||
return session.url; | ||
} | ||
$uri: (session) => session.url | ||
}, | ||
@@ -124,9 +123,5 @@ finalize: { | ||
api: 'avatar', | ||
// eslint-disable-next-line no-unused-vars | ||
$resource: function $resource(session) { | ||
return `profile/${session.id}`; | ||
}, | ||
$body: function $body(session) { | ||
return session; | ||
} | ||
$resource: (session) => | ||
// eslint-disable-next-line max-len | ||
`profile/${this.webex.internal.device.userId}/session/${session.id}` | ||
} | ||
@@ -133,0 +128,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
119501
2434