Skip to content

Commit

Permalink
use base64ToString + remove logging
Browse files Browse the repository at this point in the history
  • Loading branch information
engelhartrueben committed Sep 16, 2024
1 parent bfb08f5 commit 1367b04
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/server/api/lib/import-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { compose, map, reduce, getOr, find, filter, has } from "lodash/fp";
import { r, cacheableData } from "../../models";
import { getConfig } from "./config";
import { log } from "../../../lib";
import { base64ToString } from "./utils";

const textRegex = RegExp(".*[A-Za-z0-9]+.*");

Expand All @@ -18,12 +19,7 @@ const getDocument = async documentId => {
}

// decodes
let key = (
new Buffer.from(base64Key, 'base64')
).toString('utf8');

// debugging
log.info(key);
let key = base64ToString(base64Key);

try {
key = JSON.parse(key);
Expand Down

0 comments on commit 1367b04

Please sign in to comment.