Fix banner selection from user page and drives

Previously, updateBanner takes a callback as a first argument of the function, but some calls passes a file object.

I've refactored it with Promise to avoid those misuses (although it should have type definitions :/)
This commit is contained in:
unarist
2018-04-09 00:33:56 +09:00
parent 2ce9ea2eda
commit 8a37227907
2 changed files with 30 additions and 24 deletions

View File

@ -62,7 +62,7 @@ export default Vue.extend({
onBannerClick() {
if (!(this as any).os.isSignedIn || (this as any).os.i.id != this.user.id) return;
(this as any).apis.updateBanner((this as any).os.i, i => {
(this as any).apis.updateBanner().then(i => {
this.user.bannerUrl = i.bannerUrl;
});
}