Compare commits

..

4 Commits

Author SHA1 Message Date
Kayne Ruse 7bbd6bbcf1 Wait, that's better 2021-03-11 00:01:19 +11:00
Kayne Ruse 7ddef6ed1b Added DB_QUIET as an option 2021-03-10 23:57:27 +11:00
Kayne Ruse 4581f0376a Fixed crash when no password provided on account deletion 2021-03-10 23:43:57 +11:00
Kayne Ruse da8bba93eb Finally playing nice together 2021-03-07 15:34:04 +11:00
4 changed files with 4 additions and 3 deletions
+1
View File
@@ -1,3 +1,4 @@
FROM node:15
WORKDIR "/app"
COPY package*.json ./
+1 -1
View File
@@ -140,7 +140,7 @@ CMD ["sleep 10 && npm start"]
const sqlfile = `
CREATE DATABASE IF NOT EXISTS ${appName};
CREATE USER IF NOT EXISTS '${appDBUser}'@'%' IDENTIFIED BY '${appDBPass}';
GRANT ALL PRIVILEGES ON ${appName}.* TO '${appDBUser}'@'%';
GRANT ALL PRIVILEGES ON ${appName}.* TO '${appDBUser}'@'%';
`;
fs.writeFileSync('docker-compose.yml', ymlfile);
+1 -1
View File
@@ -17,7 +17,7 @@ const route = async (req, res) => {
//compare the user's password
const compare = utils.promisify(bcrypt.compare);
const match = await compare(req.body.password, account.hash);
const match = await compare(req.body.password || '', account.hash);
if (!match) {
return res.status(401).send('incorrect password');
+1 -1
View File
@@ -4,7 +4,7 @@ const sequelize = new Sequelize(process.env.DB_DATABASE, process.env.DB_USERNAME
host: process.env.DB_HOSTNAME,
dialect: 'mariadb',
timezone: process.env.DB_TIMEZONE,
logging: false
logging: process.env.DB_LOGGING ? console.log : false
});
sequelize.sync();