mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-16 01:39:49 +00:00
Fix unifi with no type passing and lint
This commit is contained in:
parent
ec79f3042a
commit
67a9f4983c
3 changed files with 15 additions and 10 deletions
|
@ -14,13 +14,13 @@ const prefixCacheKey = `${proxyName}__prefix`;
|
|||
const logger = createLogger(proxyName);
|
||||
|
||||
async function getWidget(req) {
|
||||
const { group, service, type } = req.query;
|
||||
const { group, service } = req.query;
|
||||
|
||||
let widget = null;
|
||||
if (type === "unifi_console") {
|
||||
if (group === "unifi_console" && service === "unifi_console") {
|
||||
// info widget
|
||||
const index = req.query?.query ? JSON.parse(req.query.query).index : undefined;
|
||||
widget = await getPrivateWidgetOptions(type, index);
|
||||
widget = await getPrivateWidgetOptions("unifi_console", index);
|
||||
if (!widget) {
|
||||
logger.debug("Error retrieving settings for this Unifi widget");
|
||||
return null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue