Skip to content

Commit 76b5287

Browse files
committed
Add upload file handler
1 parent 1f663d9 commit 76b5287

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

site/src/testHelpers/handlers.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,15 @@ export const handlers = [
373373
},
374374
),
375375

376+
rest.post("/api/v2/files", (_, res, ctx) => {
377+
return res(
378+
ctx.status(200),
379+
ctx.json({
380+
hash: "some-file-hash",
381+
}),
382+
);
383+
}),
384+
376385
rest.get("/api/v2/files/:fileId", (_, res, ctx) => {
377386
const fileBuffer = fs.readFileSync(
378387
path.resolve(__dirname, "./templateFiles.tar"),

0 commit comments

Comments
 (0)