asyncfunctiongetInfo(timestamp) { // Ensure the timestamp is a number or default to the current time timestamp = typeof timestamp === "number" ? timestamp : Date.now();
// Remove test data from before the movie was released let minTimestamp = newDate(CONFIG.min_public_time || DEFAULT_CONFIG.min_public_time).getTime(); timestamp = Math.max(timestamp, minTimestamp);
// Fetch data from the database try { const data = await sql.all( `SELECT wishid, date, place, contact, reason, timestamp FROM wishes WHERE timestamp >= ?`, [timestamp] ); return data; } catch (e) { throw e; } }