import {db} from '../../db.js'; const checkSession = async (token) => { try { const [sessionIsValid] = await db('users') .select('id') .whereNull('deletedAt') .andWhere('sessionToken', '=', token); return !!sessionIsValid } catch (e) { return 'error' + e } } export {checkSession};