Skip to content

Commit

Permalink
fixed header name (#1384)
Browse files Browse the repository at this point in the history
  • Loading branch information
daimor authored Jun 20, 2024
1 parent 8646c9b commit 4273bab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand Down

0 comments on commit 4273bab

Please sign in to comment.