This commit is contained in:
Fang-Pen Lin
2025-11-12 21:33:41 -08:00
parent 1b90a1dca0
commit 3742d23d60

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({
method: "POST",
url: "/clear-all",
@@ -70,4 +53,21 @@ export const registerBddNockRouter = async (server: FastifyZodProvider) => {
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" };
}
});
};