diff --git a/package.json b/package.json index c29edc9..b16a432 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "designhub-api", - "version": "1.6.1", + "version": "1.7.0", "description": "REST API written in TypeScript using express and mysql", "author": "designhub", "contributors": [ diff --git a/src/app.ts b/src/app.ts index b4c3124..7ca1908 100644 --- a/src/app.ts +++ b/src/app.ts @@ -38,7 +38,7 @@ app.use(cors({ origin: true })); -app.use('/documentation', express.static(path.join(__dirname, './apidoc'))); +app.use('/docs', express.static(path.join(__dirname, './apidoc'))); app.use((req, res, next) => { const publicEndpoints: Array = ['/', '/topdesign/posts/month', '/levels', '/donate', '/topdesign/posts/currentmonth']; diff --git a/src/config-rewrapper.ts b/src/config-rewrapper.ts index ce15920..460a3bc 100644 --- a/src/config-rewrapper.ts +++ b/src/config-rewrapper.ts @@ -4,15 +4,13 @@ export = { host: process.env.DB_HOST, user: process.env.DB_USER, password: process.env.DB_PASS, - database: process.env.DB_DATABASE + database: process.env.DB_DATABASE, }, imgur: { clientID: process.env.IMGUR_CLIENT_ID, clientSecret: process.env.IMGUR_CLIENT_SECRET }, env: process.env.ENVIRONMENT, - development: process.env.ENVIRONMENT.includes('development'), - mysql_development: () => { - if (process.env.SQL_DEBUG && this.development) { return true; } - } + development: process.env.ENVIRONMENT.includes('development') + }; diff --git a/src/services/connection.ts b/src/services/connection.ts index e1cb34b..ea8f6c7 100644 --- a/src/services/connection.ts +++ b/src/services/connection.ts @@ -20,7 +20,7 @@ module Connection { user: conf.mysql.user, password: conf.mysql.password, database: conf.mysql.database, - debug: conf.mysql_development + debug: conf.development }); con.on('error', function (err) {