From 4273bab6525014b638a5e6b871dd1f27f551cbee Mon Sep 17 00:00:00 2001 From: Dmitry Maslennikov Date: Thu, 20 Jun 2024 18:58:19 +0700 Subject: [PATCH] fixed header name (#1384) --- src/api/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/index.ts b/src/api/index.ts index 71ceead7..4370e332 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -506,7 +506,7 @@ export class AtelierAPI { name = this.transformNameIfCsp(name); const headers = {}; if (mtime && mtime > 0) { - headers["IF_NONE_MATCH"] = new Date(mtime).toISOString().replace(/T|Z/g, " ").trim(); + headers["IF-NONE-MATCH"] = new Date(mtime).toISOString().replace(/T|Z/g, " ").trim(); } return this.request(1, "GET", `${this.ns}/doc/${name}`, null, params, headers); } @@ -531,7 +531,7 @@ export class AtelierAPI { name = this.transformNameIfCsp(name); const headers = {}; if (!ignoreConflict && data.mtime && data.mtime > 0) { - headers["IF_NONE_MATCH"] = new Date(data.mtime).toISOString().replace(/T|Z/g, " ").trim(); + headers["IF-NONE-MATCH"] = new Date(data.mtime).toISOString().replace(/T|Z/g, " ").trim(); } return this.request(1, "PUT", `${this.ns}/doc/${name}`, data, params, headers); }