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:
parent
2ce9ea2eda
commit
8a37227907
2 changed files with 30 additions and 24 deletions
|
|
@ -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;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue