Skip to content

Commit e424144

Browse files
author
khanh2906
committed
update v0.6.11
1 parent 3df195c commit e424144

File tree

7 files changed

+2
-12
lines changed

7 files changed

+2
-12
lines changed

lib/handlers/generateElements.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ module.exports = {
4545
try {
4646
// ${func} implementation
4747
await res.send("Hello World");
48-
next();
4948
} catch (error) {
5049
next(error)
5150
}

lib/stubs/elements/controller.stub

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ module.exports = {
44
index: async function (req, res, next) {
55
try {
66
await res.send("Hello World")
7-
next();
87
} catch(error) {
98
next(error)
109
}

lib/stubs/template/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ REDIS_QUEUE_DB=1
4646
REDIS_QUEUE_TLS=
4747

4848
# Config log
49-
LOG_FILE=false
49+
LOG_REQUEST=false
5050

5151
# Config file
5252
FILE_OPTION=local

lib/stubs/template/src/app/http/controllers/api/demo.controller.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ module.exports = {
99
age: 12
1010
}
1111
res.status(200).sendUser(user);
12-
next();
1312
} catch (error) {
1413
next(error)
1514
}

lib/stubs/template/src/app/http/controllers/web/demo.controller.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@ const { bamimiVersion } = require("./../../../../../package.json")
55
module.exports = {
66
index: async function (req, res, next) {
77
try {
8-
await res.view({
8+
res.view({
99
view: "pages/home", data: {
1010
version: `v${bamimiVersion}`
1111
}
1212
});
13-
14-
next();
1513
} catch (error) {
1614
next(error)
1715
}

lib/stubs/template/src/kernel/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ exports.middleware = {
4444
* **********************************
4545
*/
4646
async (err, req, res, next) => {
47-
console.log(process.env.NODE_ENV)
4847
if (process.env.NODE_ENV != "development") {
4948
console.error("LOG ERROR:", err)
5049
if ('api' === req.reqType) {

tests/units/generate-element.spec.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ describe('Element Generator', () => {
2323
module.exports = {
2424
index: async function (req, res) {
2525
await res.send("Hello World");
26-
next();
2726
},
2827
// more
2928
};`);
@@ -37,7 +36,6 @@ describe('Element Generator', () => {
3736
index: async function (req, res, next) {
3837
try {
3938
await res.status(200).sendMessage({ msg: 'ok' });
40-
next();
4139
} catch(error) {
4240
next(error)
4341
}
@@ -47,7 +45,6 @@ describe('Element Generator', () => {
4745
try {
4846
// testFunc1 implementation
4947
await res.status(200).sendMessage({ msg: 'ok' });
50-
next();
5148
} catch(error) {
5249
next(error)
5350
}
@@ -57,7 +54,6 @@ describe('Element Generator', () => {
5754
try {
5855
// testFunc2 implementation
5956
await res.status(200).sendMessage({ msg: 'ok' });
60-
next();
6157
} catch(error) {
6258
next(error)
6359
}

0 commit comments

Comments
 (0)