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:
@ -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;
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user