1
0
Fork 0

Improved ships lib with ships db caching

This commit is contained in:
Julien Dessaux 2023-06-02 00:00:09 +02:00
parent 68c457964a
commit 7008c91c6f
Signed by: adyxax
GPG key ID: F92E51B86E07177E
10 changed files with 170 additions and 32 deletions

View file

@ -1,6 +1,6 @@
import db from './db.js';
const getTokenStatement = db.prepare(`SELECT json_extract(value, '$.token') as token from config where key = 'register_data';`);
const getTokenStatement = db.prepare(`SELECT value->>'token' as token from config where key = 'register_data';`);
const registerAgentStatement = db.prepare(`INSERT INTO config(key, value) VALUES ('register_data', json(?));`);
export function getToken() {