Fix: fix kavita API body with key (#4948)

This commit is contained in:
shamoon 2025-03-14 21:09:46 -07:00 committed by GitHub
parent 9b06212a92
commit b5ac617597
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,7 +14,11 @@ async function login(widget, service) {
const endpoint = "Account/login";
const api = widgets?.[widget.type]?.api;
const loginUrl = new URL(formatApiCall(api, { endpoint, ...widget }));
const loginBody = {};
const loginBody = {
username: "",
password: "",
apiKey: "",
};
if (widget.username && widget.password) {
loginBody.username = widget.username;
loginBody.password = widget.password;