Bump version to 1.7.8
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { grafikProxy } from '../proxy';
|
||||
|
||||
function getSlugFromRequest(req: Request) {
|
||||
const url = new URL(req.url);
|
||||
const prefix = '/api/statistik/grafik';
|
||||
const path = url.pathname;
|
||||
if (!path.startsWith(prefix)) return undefined;
|
||||
const suffix = path.slice(prefix.length);
|
||||
return suffix.split('/').filter(Boolean);
|
||||
}
|
||||
|
||||
export async function GET(req: Request) {
|
||||
return grafikProxy(req, getSlugFromRequest(req));
|
||||
}
|
||||
|
||||
export async function POST(req: Request) {
|
||||
return grafikProxy(req, getSlugFromRequest(req));
|
||||
}
|
||||
Reference in New Issue
Block a user