Merge branch 'master' of github.com:NuSkooler/enigma-bbs into 216-waiting-for-caller

This commit is contained in:
Bryan Ashby
2020-12-11 14:31:53 -07:00
6 changed files with 51 additions and 20 deletions

View File

@@ -135,7 +135,7 @@ exports.getModule = class OnelinerzModule extends MenuModule {
self.db.each(
`SELECT *
FROM (
SELECT *
SELECT *
FROM onelinerz
ORDER BY timestamp DESC
LIMIT ${limit}
@@ -248,8 +248,9 @@ exports.getModule = class OnelinerzModule extends MenuModule {
async.series(
[
function openDatabase(callback) {
const dbSuffix = self.menuConfig.config.dbSuffix;
self.db = getTransactionDatabase(new sqlite3.Database(
getModDatabasePath(exports.moduleInfo),
getModDatabasePath(exports.moduleInfo, dbSuffix),
err => {
return callback(err);
}
@@ -260,7 +261,7 @@ exports.getModule = class OnelinerzModule extends MenuModule {
`CREATE TABLE IF NOT EXISTS onelinerz (
id INTEGER PRIMARY KEY,
user_id INTEGER_NOT NULL,
user_name VARCHAR NOT NULL,
user_name VARCHAR NOT NULL,
oneliner VARCHAR NOT NULL,
timestamp DATETIME NOT NULL
);`