diff --git a/backend/api-renamed/downgrade.js b/backend/api-renamed/downgrade.js index bf240be0..08975e04 100644 --- a/backend/api-renamed/downgrade.js +++ b/backend/api-renamed/downgrade.js @@ -1,6 +1,6 @@ import { getUserAccess, deleteUser } from "../src/common/database.js"; import axios from "axios"; -import { logger } from "../src/index.js"; +import { logger } from "../src/common/log.js"; export default async (req, res) => { // We could optimize this method by doing both database operations in one statement, using "DELETE ... RETURNING ..." diff --git a/backend/src/common/render.js b/backend/src/common/render.js index 6b970c35..6190ea90 100644 --- a/backend/src/common/render.js +++ b/backend/src/common/render.js @@ -117,6 +117,14 @@ const iconWithLabel = (icon, label, testid, iconSize) => { return flexLayout({ items: [iconSvg, text], gap: 20 }).join(""); }; +// Script parameters. +const ERROR_CARD_LENGTH = 576.5; + +const UPSTREAM_API_ERRORS = [ + TRY_AGAIN_LATER, + SECONDARY_ERROR_MESSAGES.MAX_RETRY, +]; + /** * Renders error message on the card. * @@ -222,14 +230,6 @@ const measureText = (str, fontSize = 10) => { ); }; -// Script parameters. -const ERROR_CARD_LENGTH = 576.5; - -const UPSTREAM_API_ERRORS = [ - TRY_AGAIN_LATER, - SECONDARY_ERROR_MESSAGES.MAX_RETRY, -]; - export { ERROR_CARD_LENGTH, renderError,