Skip to content

Commit

Permalink
refactor(routes)!: rename backgroundColor param to background_color
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `backgroundColor` query string param renamed to `background_color`
  • Loading branch information
Fdawgs committed Nov 25, 2024
1 parent f740eda commit 53043ef
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/routes/docx/html/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async function route(server, options) {
res.type("text/html; charset=utf-8");
return server.tidyCss(tidiedHtml, {
fonts: req.query.fonts,
backgroundColor: req.query.backgroundColor,
backgroundColor: req.query.background_color,
});
},
});
Expand Down
2 changes: 1 addition & 1 deletion src/routes/docx/html/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const docxToHtmlPostSchema = {
query: S.object()
.additionalProperties(false)
.prop(
"backgroundColor",
"background_color",
S.string()
.description(
"HTML document background color; set or replace the `background-color` property value of `div` CSS selectors"
Expand Down
2 changes: 1 addition & 1 deletion src/routes/pdf/html/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async function route(server, options) {

return server.tidyCss(tidiedHtml, {
fonts: req.query.fonts,
backgroundColor: req.query.backgroundColor,
backgroundColor: req.query.background_color,
});
},
});
Expand Down
2 changes: 1 addition & 1 deletion src/routes/pdf/html/route.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const tidyHtml = require("../../../plugins/tidy-html");

// Generates 64 different combinations
const queryStrings = generateCombos([
{ backgroundColor: "white" },
{ background_color: "white" },
{ firstPageToConvert: "1" },
{ fonts: "Arial" },
{ ignoreImages: "true" },
Expand Down
2 changes: 1 addition & 1 deletion src/routes/pdf/html/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const pdfToHtmlPostSchema = {
query: S.object()
.additionalProperties(false)
.prop(
"backgroundColor",
"background_color",
S.string()
.description(
"HTML document background color; set or replace the `background-color` property value of `div` CSS selectors"
Expand Down
2 changes: 1 addition & 1 deletion src/routes/rtf/html/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async function route(server, options) {

return server.tidyCss(tidiedHtml, {
fonts: req.query.fonts,
backgroundColor: req.query.backgroundColor,
backgroundColor: req.query.background_color,
});
},
});
Expand Down
2 changes: 1 addition & 1 deletion src/routes/rtf/html/route.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const tidyHtml = require("../../../plugins/tidy-html");

// Generates 12 different combinations
const queryStrings = generateCombos([
{ backgroundColor: "white" },
{ background_color: "white" },
{ fonts: "Arial" },
{ fonts: "Arial, Sans Serif" },
{ language: "fr" },
Expand Down
2 changes: 1 addition & 1 deletion src/routes/rtf/html/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const rtfToHtmlPostSchema = {
query: S.object()
.additionalProperties(false)
.prop(
"backgroundColor",
"background_color",
S.string()
.description(
"HTML document background color; set or replace the `background-color` property value of `div` CSS selectors"
Expand Down

0 comments on commit 53043ef

Please sign in to comment.