import { webMentionHandler } from "https://esm.town/v/byjp/webMentionHandler";
export const recordWebmention = async (
req: express.Request,
res: express.Response,
) => {
try {
const recomendedResponse = await webMentionHandler
.addPendingMention(req.body.source, req.body.target);
res.status(recomendedResponse.code).send("accepted");
}
catch (e) {
res.status(400).send(e.message);
}
};