default enable fields

This commit is contained in:
Robonau 2024-11-11 01:45:30 +00:00 committed by shamoon
parent 04a34af0d9
commit 6aa00c4efc

View File

@ -240,6 +240,11 @@ export default async function suwayomiProxyHandler(req, res) {
} }
/** @type {{ fields: string[],category: string|number|undefined, type: keyof typeof widgets }} */ /** @type {{ fields: string[],category: string|number|undefined, type: keyof typeof widgets }} */
const widget = await getServiceWidget(group, service); const widget = await getServiceWidget(group, service);
if (widget.fields.length === 0) {
widget.fields = ["download", "nondownload", "read", "unread"];
}
widget.fields.length = 4; widget.fields.length = 4;
widget.fields = widget.fields.map((f) => f.toLowerCase()); widget.fields = widget.fields.map((f) => f.toLowerCase());
/** @type {Set<string>} */ /** @type {Set<string>} */