The code works fine while running in local. But the DELETE method doesn't run when running in public.