Skip to content

Commit

Permalink
Removing static path
Browse files Browse the repository at this point in the history
  • Loading branch information
caparker committed Jun 17, 2024
1 parent 58c1efd commit 752811e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion fetcher/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const { promisify } = require('util');
const request = promisify(require('request'));
const fs = require('node:fs');
const path = require('path');
const homedir = require('os').homedir();

const { SecretsManagerClient, GetSecretValueCommand } = require('@aws-sdk/client-secrets-manager');
const { S3Client, GetObjectCommand, PutObjectCommand } = require('@aws-sdk/client-s3');
Expand Down Expand Up @@ -72,7 +73,7 @@ async function putObject(text, Bucket, Key, gzip = true, ContentType = 'applicat
* @param {} key
*/
async function putFile(text, key) {
let fpath = `/home/christian/Downloads/${key}`;
const fpath = path.join(homedir, `Downloads/${key}`);
await fs.mkdirSync(path.dirname(fpath), { recursive: true });
await fs.writeFileSync(fpath, text);
}
Expand Down
1 change: 0 additions & 1 deletion fetcher/providers/clarity.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

const Providers = require('../lib/providers');
const { VERBOSE, request } = require('../lib/utils');

Check failure on line 9 in fetcher/providers/clarity.js

View workflow job for this annotation

GitHub Actions / build

'VERBOSE' is assigned a value but never used
//const { Sensor, SensorNode, SensorSystem } = require('../lib/station');
const { Measures, FixedMeasure } = require('../lib/measure');
const { Measurand } = require('../lib/measurand');

Expand Down

0 comments on commit 752811e

Please sign in to comment.