mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
edited the way api keys are handled.
Since API keys are now loaded from the auth server, this means that there is a delay between starting the software, loading the keys, and loading all the module files. Due to nodejs running Async, the modules are being loaded BEFORE the api keys have been returned from the auth server. So now the api keys are being set inside the module every time the module is being called. This has absolutely no impact on performance, or security, plus, this was the easiest solution, especially as it required no big changes to the rest of the code
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const API_KEY = process.env.ASSEMBLYAI_API_KEY;
|
||||
let API_KEY
|
||||
const BASE_URL = 'https://api.assemblyai.com/v2';
|
||||
|
||||
//---------------------------------------------------Upload audio---------------------------------------------------
|
||||
@@ -92,6 +92,7 @@ module.exports = {
|
||||
audioformat: "mp3",
|
||||
|
||||
async function(audioFileName) {
|
||||
API_KEY = process.env.ASSEMBLYAI_API_KEY;
|
||||
return new Promise(async (resolve, reject) => {
|
||||
try {
|
||||
// audioFileName ist nur "datei.mp3"
|
||||
|
||||
Reference in New Issue
Block a user