From 189e126983d0b2559e2bd7effa8cc679f11435fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Gro=C3=9F?= Date: Thu, 8 Jun 2023 10:13:03 +0200 Subject: [PATCH] Rendering: Add configurable Jose endpoint --- .env.example | 3 ++- util/rendering.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index c0a73b7..484f4d0 100644 --- a/.env.example +++ b/.env.example @@ -9,4 +9,5 @@ DB_ROOTPW= DB_PORT= API_PORT=3080 API_ACCESS_TOKEN= -HOMEPAGE_URL= \ No newline at end of file +HOMEPAGE_URL= +JOSE_ENDPOINT= \ No newline at end of file diff --git a/util/rendering.js b/util/rendering.js index 1cc597e..6bd9d1d 100644 --- a/util/rendering.js +++ b/util/rendering.js @@ -1,3 +1,4 @@ +require("dotenv").config(); const sharp = require('sharp'); const crypto = require('crypto'); const fs = require('fs'); @@ -105,7 +106,7 @@ module.exports = { } console.log("Fetching ", ); - let { data } = await axios.post('https://jose.toho.mnz.gg/jobs', job); + let { data } = await axios.post(`${process.env.JOSE_ENDPOINT}/jobs`, job); console.log("Fetched ", data); return data["path"];