eslint fix

This commit is contained in:
Данил 2024-10-21 20:39:06 +03:00
parent 46661287fa
commit c9c9717d22
6 changed files with 58 additions and 40 deletions

View file

@ -2,13 +2,18 @@ const fs = require('fs');
const pool = require('./postgresql.js');
async function create_table() {
const schema = fs.readFileSync('../shared/database/data/schema.sql', 'utf8');
const schema = fs.readFileSync(
'../shared/database/data/schema.sql',
'utf8',
);
for (let i = 0; i < schema.split(';').length; i++) {
try {
await pool.query(schema.split(';')[i]);
} catch (err) { continue }
} catch (err) {
continue;
}
}
}
module.exports = create_table;
module.exports = create_table;