mirror of
https://github.com/gethomepage/homepage.git
synced 2026-10-16 23:41:45 -07:00
Refactor: auth architecture (#7256)
This commit is contained in:
@@ -2,6 +2,8 @@ import { getSettings } from "../../../utils/config/config";
|
||||
import createLogger from "../../../utils/logger";
|
||||
import { httpProxy } from "../../../utils/proxy/http";
|
||||
|
||||
import { withAuth } from "utils/auth";
|
||||
|
||||
const logger = createLogger("longhorn");
|
||||
|
||||
function parseLonghornData(data) {
|
||||
@@ -47,7 +49,7 @@ function parseLonghornData(data) {
|
||||
return nodes;
|
||||
}
|
||||
|
||||
export default async function handler(req, res) {
|
||||
async function handler(req, res) {
|
||||
const settings = getSettings();
|
||||
const longhornSettings = settings?.providers?.longhorn || {};
|
||||
const { url, username, password } = longhornSettings;
|
||||
@@ -85,3 +87,5 @@ export default async function handler(req, res) {
|
||||
nodes,
|
||||
});
|
||||
}
|
||||
|
||||
export default withAuth(handler);
|
||||
|
||||
Reference in New Issue
Block a user