mirror of
https://github.com/lnbits/lnbits.git
synced 2025-10-06 18:02:38 +02:00
cleanup prints and console logs
This commit is contained in:
@@ -27,7 +27,7 @@ async def update_wallet_balance(wallet_id: str, amount: int) -> str:
|
|||||||
|
|
||||||
async def update_admin(user: str, **kwargs) -> Admin:
|
async def update_admin(user: str, **kwargs) -> Admin:
|
||||||
q = ", ".join([f"{field[0]} = ?" for field in kwargs.items()])
|
q = ", ".join([f"{field[0]} = ?" for field in kwargs.items()])
|
||||||
print("UPDATE", q)
|
# print("UPDATE", q)
|
||||||
await db.execute(
|
await db.execute(
|
||||||
f'UPDATE admin SET {q} WHERE "user" = ?', (*kwargs.values(), user)
|
f'UPDATE admin SET {q} WHERE "user" = ?', (*kwargs.values(), user)
|
||||||
)
|
)
|
||||||
|
@@ -1310,7 +1310,7 @@
|
|||||||
theme: theme.toString(),
|
theme: theme.toString(),
|
||||||
ad_space: ad_space.toString()
|
ad_space: ad_space.toString()
|
||||||
}
|
}
|
||||||
console.log(data)
|
//console.log(data)
|
||||||
LNbits.api
|
LNbits.api
|
||||||
.request(
|
.request(
|
||||||
'POST',
|
'POST',
|
||||||
@@ -1319,7 +1319,7 @@
|
|||||||
data
|
data
|
||||||
)
|
)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
console.log(response.data)
|
//console.log(response.data)
|
||||||
this.$q.notify({
|
this.$q.notify({
|
||||||
type: 'positive',
|
type: 'positive',
|
||||||
message: 'Success! Settings changed!',
|
message: 'Success! Settings changed!',
|
||||||
|
@@ -35,7 +35,7 @@ async def api_update_admin(
|
|||||||
w: WalletTypeInfo = Depends(require_admin_key)
|
w: WalletTypeInfo = Depends(require_admin_key)
|
||||||
):
|
):
|
||||||
admin = await get_admin()
|
admin = await get_admin()
|
||||||
print(data)
|
# print(data)
|
||||||
if not admin.user == w.wallet.user:
|
if not admin.user == w.wallet.user:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=HTTPStatus.FORBIDDEN, detail="Not allowed: not an admin"
|
status_code=HTTPStatus.FORBIDDEN, detail="Not allowed: not an admin"
|
||||||
@@ -51,7 +51,7 @@ async def api_update_admin(
|
|||||||
|
|
||||||
g().admin_conf = g().admin_conf.copy(update=updated.dict())
|
g().admin_conf = g().admin_conf.copy(update=updated.dict())
|
||||||
|
|
||||||
print(g().admin_conf)
|
# print(g().admin_conf)
|
||||||
return {"status": "Success"}
|
return {"status": "Success"}
|
||||||
|
|
||||||
@admin_ext.post("/api/v1/admin/funding/", status_code=HTTPStatus.OK)
|
@admin_ext.post("/api/v1/admin/funding/", status_code=HTTPStatus.OK)
|
||||||
|
Reference in New Issue
Block a user