feat: edit wallet name by admin (#3417)
This commit is contained in:
@@ -333,7 +333,6 @@ window.UsersPageLogic = {
|
||||
const url = `${window.location.origin}/wallet?usr=${this.activeWallet.userId}&wal=${walletId}`
|
||||
this.copyText(url)
|
||||
},
|
||||
|
||||
fetchUsers(props) {
|
||||
this.relaxFilterForFields(['username', 'email'])
|
||||
const params = LNbits.utils.prepareFilterQuery(this.usersTable, props)
|
||||
@@ -367,6 +366,23 @@ window.UsersPageLogic = {
|
||||
}
|
||||
})
|
||||
},
|
||||
updateWallet(userWallet) {
|
||||
LNbits.api
|
||||
.request('PATCH', '/api/v1/wallet', userWallet.adminkey, {
|
||||
name: userWallet.name
|
||||
})
|
||||
.then(() => {
|
||||
userWallet.editable = false
|
||||
Quasar.Notify.create({
|
||||
message: 'Wallet name updated.',
|
||||
type: 'positive',
|
||||
timeout: 3500
|
||||
})
|
||||
})
|
||||
.catch(err => {
|
||||
LNbits.utils.notifyApiError(err)
|
||||
})
|
||||
},
|
||||
|
||||
toggleAdmin(userId) {
|
||||
LNbits.api
|
||||
|
||||
Reference in New Issue
Block a user