mirror of
https://github.com/gethomepage/homepage.git
synced 2026-10-19 08:51:45 -07:00
Refactor: auth architecture (#7256)
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { withAuth } from "utils/auth";
|
||||
import createLogger from "utils/logger";
|
||||
import { cachedRequest } from "utils/proxy/http";
|
||||
|
||||
const logger = createLogger("releases");
|
||||
|
||||
export default async function handler(req, res) {
|
||||
async function handler(req, res) {
|
||||
const releasesURL = "https://api.github.com/repos/gethomepage/homepage/releases";
|
||||
try {
|
||||
return res.send(await cachedRequest(releasesURL, 5));
|
||||
@@ -12,3 +13,5 @@ export default async function handler(req, res) {
|
||||
return res.send([]);
|
||||
}
|
||||
}
|
||||
|
||||
export default withAuth(handler);
|
||||
|
||||
Reference in New Issue
Block a user