From d99427256e497ae97a5a3320bb678ac20288cf80 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Thu, 13 Feb 2020 15:03:15 -0500 Subject: [PATCH] curlirize --- packages/siaviewnode-server/src/main.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/siaviewnode-server/src/main.ts b/packages/siaviewnode-server/src/main.ts index 33a0dfde..47b0ef91 100644 --- a/packages/siaviewnode-server/src/main.ts +++ b/packages/siaviewnode-server/src/main.ts @@ -37,7 +37,7 @@ const MAX_UPLOAD_FILESIZE = 1000 * 1024 * 1024 const SIAD_ENDPOINT = "http://localhost:9980" // simple siad connection with static strings -const siad = axios.create({ +const siad = curlirize(axios.create({ baseURL: SIAD_ENDPOINT, headers: { "User-Agent": "Sia-Agent", @@ -47,7 +47,7 @@ const siad = axios.create({ username: "", password: fs.readFileSync(homedir().concat("/.sia/apipassword"), "utf8").trim() } -}) +})) // Ramda shared utility functions @@ -208,7 +208,6 @@ export class Server { return res.send(data) } catch (err) { const { message } = err; - this.logger.error(err) this.logger.error(message) return res.status(500).send({ error: err.message }) }