Fix: Change API endpoint to /api/create

This commit is contained in:
2025-09-26 19:55:34 -07:00
parent db46122e5b
commit 9237ff1119

View File

@@ -7,7 +7,7 @@ export async function onRequest({request, env, next}){
const u=new URL(request.url)
// Handle POST request to create a link (API call)
if(u.pathname==='/'&&request.method==='POST'){
if(u.pathname==='/api/create'&&request.method==='POST'){
try{
const{url:t}=await request.json();
new URL(t);