This commit is contained in:
Fang-Pen Lin
2025-11-13 09:21:59 -08:00
parent 1b90a1dca0
commit 3742d23d60
+17 -17
View File
@@ -37,23 +37,6 @@ export const registerBddNockRouter = async (server: FastifyZodProvider) => {
} }
}); });
server.route({
method: "POST",
url: "/restore",
schema: {
response: {
200: z.object({ status: z.string() })
}
},
onRequest: verifyAuth([AuthMode.JWT]),
handler: async (req) => {
checkIfBddNockApiEnabled();
logger.info("Restore network requests from nock");
nock.restore();
return { status: "ok" };
}
});
server.route({ server.route({
method: "POST", method: "POST",
url: "/clear-all", url: "/clear-all",
@@ -70,4 +53,21 @@ export const registerBddNockRouter = async (server: FastifyZodProvider) => {
return { status: "ok" }; return { status: "ok" };
} }
}); });
server.route({
method: "POST",
url: "/restore",
schema: {
response: {
200: z.object({ status: z.string() })
}
},
onRequest: verifyAuth([AuthMode.JWT]),
handler: async (req) => {
checkIfBddNockApiEnabled();
logger.info("Restore network requests from nock");
nock.restore();
return { status: "ok" };
}
});
}; };