Skip to content

Commit 8440ae1

Browse files
committed
fix: add a missing comma to fix syntax error
1 parent efe1d9c commit 8440ae1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/js/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ app.get('/v1/categories/count', (req, res) => {
4141
app.get('/v1/collections/:collectionId/categories/count', (req, res) => {
4242
pool.query(
4343
'SELECT COUNT(DISTINCT s.category_id) AS counter FROM collections_series cs JOIN series s ON s.id = cs.series_id WHERE cs.collection_id = :collectionId',
44-
{ "collectionId": req.params.collectionId }
44+
{ "collectionId": req.params.collectionId },
4545
(err, rows, fields) => {
4646
if (err) {
4747
throw err

src/templates/app.js.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const pool = mysql.createPool({
3030
%>
3131
app.get('<%- endpoint.path %>', (req, res) => {
3232
pool.query(
33-
<%- formatQuery(endpoint.get) %>,<%- params.length > 0 ? '\n ' + formatParams(params) : '' %>
33+
<%- formatQuery(endpoint.get) %>,<%- params.length > 0 ? '\n ' + formatParams(params) + ',' : '' %>
3434
(err, rows, fields) => {
3535
if (err) {
3636
throw err

0 commit comments

Comments
 (0)