Fix username or password can be numeric
The Homebridge API only accepts strings as a payload. If the user or a password is numeric, this will lead to errors in the Homebridge API
This commit is contained in:
parent
0d7b77260f
commit
428ffb242b
@ -14,7 +14,7 @@ async function login(widget, service) {
|
||||
const endpoint = "auth/login";
|
||||
const api = widgets?.[widget.type]?.api;
|
||||
const loginUrl = new URL(formatApiCall(api, { endpoint, ...widget }));
|
||||
const loginBody = { username: widget.username, password: widget.password };
|
||||
const loginBody = { username: widget.username.toString(), password: widget.password.toString() };
|
||||
const headers = { "Content-Type": "application/json" };
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const [status, contentType, data, responseHeaders] = await httpProxy(loginUrl, {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user