mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 09:35:54 -08:00
Use credentialed proxy for miniflux
This commit is contained in:
@@ -1,7 +1,19 @@
|
||||
import minifluxProxyHandler from "./proxy";
|
||||
import { asJson } from "utils/proxy/api-helpers";
|
||||
import credentialedProxyHandler from "utils/proxy/handlers/credentialed";
|
||||
|
||||
const widget = {
|
||||
proxyHandler: minifluxProxyHandler,
|
||||
api: "{url}/v1/{endpoint}",
|
||||
proxyHandler: credentialedProxyHandler,
|
||||
|
||||
mappings: {
|
||||
counters: {
|
||||
endpoint: "feeds/counters",
|
||||
map: (data) => ({
|
||||
read: Object.values(asJson(data).reads).reduce((acc, i) => acc + i, 0),
|
||||
unread: Object.values(asJson(data).unreads).reduce((acc, i) => acc + i, 0)
|
||||
}),
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
export default widget;
|
||||
|
||||
Reference in New Issue
Block a user