summaryrefslogtreecommitdiff
path: root/nodejs/lib/ships.ts
diff options
context:
space:
mode:
Diffstat (limited to 'nodejs/lib/ships.ts')
-rw-r--r--nodejs/lib/ships.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/nodejs/lib/ships.ts b/nodejs/lib/ships.ts
index 74419fc..8df3aea 100644
--- a/nodejs/lib/ships.ts
+++ b/nodejs/lib/ships.ts
@@ -10,11 +10,11 @@ import {
ShipIsStillOnCooldownError,
ShipRequiresMoreFuelForNavigationError,
} from './errors.ts';
+import { Contract } from './contracts.ts';
import * as libSystems from './systems.ts';
import {
Agent,
Cargo,
- Contract,
Cooldown,
Fuel,
Nav,
@@ -25,7 +25,6 @@ import {
shortestPath,
} from './utils.ts';
import * as dbAgents from '../database/agents.ts';
-import * as dbContracts from '../database/contracts.ts';
export async function getShips(): Promise<Array<Ship>> {
const response = await send<Array<Ship>>({endpoint: `/my/ships`, page: 1});
@@ -154,8 +153,7 @@ export class Ship {
throw response;
}
}
- dbContracts.setContract(response.data.contract);
- return response.data.contract;
+ return new Contract(response.data.contract);
}
async orbit(): Promise<void> {
if (this.nav.status === 'IN_ORBIT') return;