mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-07 06:08:48 +00:00
widget refactoring
This commit is contained in:
parent
03fa2f86d7
commit
035dd25ece
29 changed files with 851 additions and 10 deletions
|
@ -1,5 +1,3 @@
|
|||
import { URLSearchParams } from "next/dist/compiled/@edge-runtime/primitives/url";
|
||||
|
||||
import createLogger from "utils/logger";
|
||||
import genericProxyHandler from "utils/proxies/generic";
|
||||
import widgets from "widgets/widgets";
|
||||
|
@ -35,10 +33,9 @@ export default async function handler(req, res) {
|
|||
|
||||
if (req.query.params) {
|
||||
const queryParams = JSON.parse(req.query.params);
|
||||
const query = new URLSearchParams(mappingParams.map(p => [p, queryParams[p]]));
|
||||
const query = new URLSearchParams(mappingParams.map((p) => [p, queryParams[p]]));
|
||||
req.query.endpoint = `${endpoint}?${query}`;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
req.query.endpoint = endpoint;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue