fix: rename bool super_user to is_super_user (#1690)

This commit is contained in:
Vlad Stan 2023-05-09 11:20:51 +03:00 committed by GitHub
parent c0f66989cb
commit 132d8a9320
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -728,7 +728,7 @@ async def get_admin_settings(is_super_user: bool = False) -> Optional[AdminSetti
row_dict = dict(sets) row_dict = dict(sets)
row_dict.pop("super_user") row_dict.pop("super_user")
admin_settings = AdminSettings( admin_settings = AdminSettings(
super_user=is_super_user, is_super_user=is_super_user,
lnbits_allowed_funding_sources=settings.lnbits_allowed_funding_sources, lnbits_allowed_funding_sources=settings.lnbits_allowed_funding_sources,
**row_dict, **row_dict,
) )

View File

@ -463,7 +463,7 @@
this.g.user.wallets[0].adminkey this.g.user.wallets[0].adminkey
) )
.then(response => { .then(response => {
this.isSuperUser = response.data.super_user || false this.isSuperUser = response.data.is_super_user || false
this.settings = response.data this.settings = response.data
this.formData = _.clone(this.settings) this.formData = _.clone(this.settings)
this.updateFundingData() this.updateFundingData()
@ -474,7 +474,7 @@
}, },
updateSettings() { updateSettings() {
let data = _.omit(this.formData, [ let data = _.omit(this.formData, [
'super_user', 'is_super_user',
'lnbits_allowed_funding_sources' 'lnbits_allowed_funding_sources'
]) ])
LNbits.api LNbits.api

View File

@ -310,7 +310,7 @@ class SuperSettings(EditableSettings):
class AdminSettings(EditableSettings): class AdminSettings(EditableSettings):
super_user: bool is_super_user: bool
lnbits_allowed_funding_sources: Optional[List[str]] lnbits_allowed_funding_sources: Optional[List[str]]