This commit is contained in:
Zef Hemel
2022-03-01 16:57:20 +01:00
parent 5cd5feeafa
commit 9b1b950c41
23 changed files with 636 additions and 290 deletions
+1 -1
View File
@@ -89,8 +89,8 @@ fsRouter.put("/:page(.*)", async (context) => {
const text = await readAll(result.value);
file.write(text);
file.close();
const stat = await Deno.stat(localPath);
console.log("Wrote to", localPath);
const stat = await Deno.stat(localPath);
context.response.status = existingPage ? 200 : 201;
context.response.headers.set("Last-Modified", "" + stat.mtime?.getTime());
context.response.body = "OK";