lndhub: fix "token" -> "refresh_token".

This commit is contained in:
fiatjaf
2020-10-06 21:53:43 -03:00
parent 24c8201920
commit 0b1f3c22e0
3 changed files with 18 additions and 5 deletions
+2 -2
View File
@@ -28,8 +28,8 @@ async def lndhub_getinfo():
)
async def lndhub_auth():
token = (
g.data["token"]
if "token" in g.data and g.data["token"]
g.data["refresh_token"]
if "refresh_token" in g.data and g.data["refresh_token"]
else urlsafe_b64encode((g.data["login"] + ":" + g.data["password"]).encode("utf-8")).decode("ascii")
)
return jsonify({"refresh_token": token, "access_token": token})