~kyoheiu/frssco

6f78580cd5efbb2430754344b7f271db8b839b5d — Kyohei Uto 10 months ago 7177ccb
Remove unused api
1 files changed, 0 insertions(+), 17 deletions(-)

D routes/api/append.ts
D routes/api/append.ts => routes/api/append.ts +0 -17
@@ 1,17 0,0 @@
import { Handlers } from "https://deno.land/x/fresh@1.1.5/server.ts";

export const handler: Handlers = {
  GET(req, _ctx) {
    const url = new URL(req.url);
    const query = url.searchParams.get("url") || "";
    console.log(query);
    try {
      Deno.writeTextFileSync("feed.txt", `\n${query}`, { append: true });
      return Response.redirect(url.origin);
    } catch (e) {
      return new Response(e, {
        status: 500,
      });
    }
  },
};