-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ES6: Migrated "assets" #912
Conversation
herrmannplatz
commented
Mar 17, 2017
•
edited
Loading
edited
- fix test
- update comments
return this._build_image_metdadata(file); | ||
} else { | ||
return Promise.resolve(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm no fan of single line if statements.. but applies nicely here:
if (this.is_video(file)) return this._build_video_metdadata(file);
if (this.is_audio(file)) return this._build_audio_metdadata(file);
if (this.is_image(file)) return this._build_image_metdadata(file);
return Promise.resolve();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But but but... #consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like I said.. already.. I'm not a big fan of it..! So I won't mind if not changed :)
app/script/assets/AssetService.js
Outdated
return resolve(JSON.parse(this.response)); | ||
} else { | ||
return reject(event); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (this.status === 201) {
return resolve(JSON.parse(this.response));
}
return reject(event);
|
||
z.assets.AssetUploadFailedReason = { | ||
FAILED: 1, | ||
CANCELLED: 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alphabetical :)