Public
Back
Version 4
12/27/2023
import { refs } from "https://esm.town/v/stevekrouse/refs";
export function editRedirect() {
const ref = refs()[0];
const editURL = `https://val.town/v/${ref.userHandle}/${ref.valName}`;
return Response.redirect(editURL);
}
export function editMiddleware(app) {
app.use("/edit", editRedirect);
return app;
}
Updated: December 27, 2023