mirror of
https://github.com/multipleof4/4ev.link.git
synced 2026-01-13 15:57:53 +00:00
Fix: Change API endpoint to /api/create
This commit is contained in:
@@ -7,7 +7,7 @@ export async function onRequest({request, env, next}){
|
|||||||
const u=new URL(request.url)
|
const u=new URL(request.url)
|
||||||
|
|
||||||
// Handle POST request to create a link (API call)
|
// Handle POST request to create a link (API call)
|
||||||
if(u.pathname==='/'&&request.method==='POST'){
|
if(u.pathname==='/api/create'&&request.method==='POST'){
|
||||||
try{
|
try{
|
||||||
const{url:t}=await request.json();
|
const{url:t}=await request.json();
|
||||||
new URL(t);
|
new URL(t);
|
||||||
|
|||||||
Reference in New Issue
Block a user