* tests: fix float problems and PAT problem * extend CONTRIBUTING.md * extend build documentation, add GH action, fix build on MacOS * fix build on Vercel * update .gitignore and CONTRIBUTING.md * feat: begin work on monorepo * chore(actions/basic-build): use pnpm * fix: vercel-deploy * docs: updates with new folders * chore: apply PR review comments --------- Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>
19 lines
542 B
JavaScript
19 lines
542 B
JavaScript
import { repeatRecentRequests } from "../src/repeatRequests.js";
|
|
|
|
export default async (req, res) => {
|
|
if (req.method !== "POST") {
|
|
res.statusCode = 405;
|
|
res.send({ error: "Method Not Allowed" });
|
|
return;
|
|
}
|
|
try {
|
|
await repeatRecentRequests();
|
|
res.statusCode = 200;
|
|
res.send({ message: "Recent requests repeated successfully." });
|
|
} catch (error) {
|
|
console.error("Error repeating recent requests:", error);
|
|
res.statusCode = 500;
|
|
res.send({ error: error.message || "Internal Server Error" });
|
|
}
|
|
};
|