File tree 2 files changed +9
-9
lines changed
examples/js/express/mysql
2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -107,4 +107,4 @@ const register = (app, pool) => {
107
107
} )
108
108
}
109
109
110
- exports . register = register ;
110
+ exports . register = register
Original file line number Diff line number Diff line change 1
1
const register = (app, pool) => {
2
2
<%
3
3
endpoints .forEach (function (endpoint ) {
4
- const path = endpoint .path ;
4
+ const path = endpoint .path
5
5
6
6
endpoint .methods .forEach (function (method ) {
7
7
if (! method .query ) {
8
8
// filter out aggregated_queries for a while (see #17)
9
9
return
10
10
}
11
- const hasGetOne = method .name === ' get' ;
12
- const hasGetMany = method .name === ' get_list' ;
13
- const sql = formatQuery (method .query );
14
- const params = extractParamsFromQuery (method .query );
11
+ const hasGetOne = method .name === ' get'
12
+ const hasGetMany = method .name === ' get_list'
13
+ const sql = formatQuery (method .query )
14
+ const params = extractParamsFromQuery (method .query )
15
15
const formattedParams = params .length > 0
16
16
? ' \n { ' + formatParamsAsJavaScriptObject (params) + ' },'
17
17
: ' '
@@ -84,13 +84,13 @@ endpoints.forEach(function(endpoint) {
84
84
})
85
85
< %
86
86
}
87
- });
88
- });
87
+ })
88
+ })
89
89
%>
90
90
app.use((error, req, res, next) => {
91
91
console.error(error)
92
92
res.status(500).json({ "error": "Internal Server Error" })
93
93
})
94
94
}
95
95
96
- exports.register = register;
96
+ exports.register = register
You can’t perform that action at this time.
0 commit comments