Made verbose output optional
This commit is contained in:
parent
a60c5e7315
commit
81f40101be
@ -1,4 +1,6 @@
|
||||
HASHTAG_FILTER = ichlausche,music,musik,nowplaying,tunetuesday
|
||||
URL_FILTER = song.link,album.link,youtube.com,youtu.be,spotify.com,music.apple.com,bandcamp.com
|
||||
YOUTUBE_API_KEY = CHANGE_ME
|
||||
VERBOSE = false
|
||||
|
||||
PUBLIC_REFRESH_INTERVAL = 10000
|
@ -1,10 +1,11 @@
|
||||
import { env } from '$env/dynamic/private';
|
||||
import type { Account, Post, Tag } from '$lib/mastodon/response';
|
||||
import sqlite3 from 'sqlite3';
|
||||
const { MODE } = import.meta.env;
|
||||
const { DEV } = import.meta.env;
|
||||
|
||||
const db: sqlite3.Database = new sqlite3.Database('moshingmammut.db');
|
||||
|
||||
if (MODE === 'development') {
|
||||
if (DEV && env.VERBOSE === 'true') {
|
||||
sqlite3.verbose();
|
||||
db.on('change', (t, d, table, rowid) => {
|
||||
console.debug('DB change event', t, d, table, rowid);
|
||||
@ -180,7 +181,6 @@ export async function getPosts(since: string | null, limit: number) {
|
||||
} else {
|
||||
filter_query = 'WHERE posts.created_at > $since';
|
||||
params.$since = since;
|
||||
console.debug('Filtering by created_at > ', since);
|
||||
}
|
||||
const sql = `SELECT posts.id, posts.content, posts.created_at, posts.url,
|
||||
accounts.id AS account_id, accounts.acct, accounts.username, accounts.display_name,
|
||||
|
Loading…
Reference in New Issue
Block a user