From d668eac4a63a9aa98c3efff395faa23cfcea1c1b Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Thu, 21 Mar 2024 17:08:37 +0100 Subject: [node] begin the great typescript rewrite --- nodejs/automation/init.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'nodejs/automation/init.js') diff --git a/nodejs/automation/init.js b/nodejs/automation/init.js index b921942..93e5a70 100644 --- a/nodejs/automation/init.js +++ b/nodejs/automation/init.js @@ -6,6 +6,8 @@ import * as dbTokens from '../database/tokens.js'; import * as api from '../lib/api.js'; import * as ships from '../lib/ships.js'; +const symbol = process.env.NODE_ENV === 'test' ? 'ADYXAX-0' : 'ADYXAX-TS'; + // This function registers then inits the database export async function init() { const response = await fetch('https://api.spacetraders.io/v2/register', { @@ -14,7 +16,7 @@ export async function init() { 'Content-Type': 'application/json', }, body: JSON.stringify({ - symbol: "ADYXAX-JS", + symbol: symbol, faction: "COSMIC", }), }); -- cgit v1.2.3