Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/libs/API.js
Original file line number Diff line number Diff line change
Expand Up @@ -583,12 +583,12 @@ function User_SecondaryLogin_Send(parameters) {

/**
* @param {Object} parameters
* @param {String} parameters.base64image
* @param {File|Object} parameters.file
* @returns {Promise}
*/
function User_UploadAvatar(parameters) {
const commandName = 'User_UploadAvatar';
requireParameters(['base64image'], parameters, commandName);
requireParameters(['file'], parameters, commandName);
return Network.post(commandName, parameters);
}

Expand Down
6 changes: 3 additions & 3 deletions src/libs/actions/PersonalDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,10 @@ function setPersonalDetails(details) {
/**
* Sets the user's avatar image
*
* @param {String} base64image
* @param {File|Object} file
*/
function setAvatar(base64image) {
API.User_UploadAvatar({base64image}).then((response) => {
function setAvatar(file) {
API.User_UploadAvatar({file}).then((response) => {
// Once we get the s3url back, update the personal details for the user with the new avatar URL
if (response.jsonCode === 200) {
setPersonalDetails({avatar: response.s3url});
Expand Down