feat: edit wallet name by admin (#3417)

This commit is contained in:
Vlad Stan
2025-10-17 10:59:16 +03:00
committed by GitHub
parent de6827af58
commit 7116353431
2 changed files with 53 additions and 14 deletions
+17 -1
View File
@@ -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