Commit 6bdf9455 authored by dangdoan's avatar dangdoan

clean code

parent 0b674df5
Pipeline #14312 canceled with stages
......@@ -4,11 +4,8 @@ const initSequelize = require('../services/dbServices');
class productProvider {
constructor(skipInitDb) {
if (skipInitDb === true) {
this.db = {};
} else {
this.db = initSequelize
}
}
async getByCode(code) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "nodejstest",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"start": "node index.js",
"gen-db": "sequelize-auto -o app/models -d inventory -h 127.0.0.1 -u root -p 3306 "
},
"dependencies": {
"axios": "^0.26.1",
"body-parser": "^1.20.0",
"change-case": "^4.1.2",
"cors": "^2.8.5",
"dotenv": "^16.0.0",
"express": "^4.17.3",
"fs": "^0.0.1-security",
"jest": "^27.5.1",
"mysql2": "^2.3.3",
"nconf": "^0.11.3",
"path": "^0.12.7",
"require-dir": "^1.2.0",
"sequelize-auto": "^0.8.8",
"supertest": "^6.2.2",
"uuid": "^8.3.2"
},
"author": "",
"license": "ISC",
"description": ""
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment