Skip to content

Commit edb72c8

Browse files
committed
chore: update comments and replace TODO by LATER in order to not puzzle 0pdd bot
1 parent 574fe28 commit edb72c8

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/templates/routes.go.ejs

+8-8
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ function extractInsertValues(queryAst) {
4747
// ]
4848
// } => [ 'user_id' ]
4949
function extractUpdateValues(queryAst) {
50-
// TODO: distinguish between b.param and q.param and extract only first
50+
// LATER: distinguish between b.param and q.param and extract only first
5151
return queryAst.set.map(elem => elem.value.type === 'param' ? elem.value.value : null)
5252
.filter(value => value) // filter out nulls
5353
}
5454
55-
// TODO: consider taking into account b.params from WHERE clause
55+
// LATER: consider taking into account b.params from WHERE clause
5656
function extractProperties(queryAst) {
5757
if (queryAst.type === 'select') {
5858
return extractSelectParameters(queryAst);
@@ -109,7 +109,7 @@ function query2dto(parser, method) {
109109
"maxFieldNameLength": lengthOfLongestString(props.map(el => el.indexOf('_') < 0 ? el : el.replace(/_/g, ''))),
110110
// required for de-duplication
111111
// [ {name:foo, type:int}, {name:bar, type:string} ] => "foo=int bar=string"
112-
// TODO: sort before join
112+
// LATER: sort before join
113113
"signature": propsWithTypes.map(field => `${field.name}=${field.type}`).join(' ')
114114
};
115115
}
@@ -171,14 +171,14 @@ endpoints.forEach(function(endpoint) {
171171
const hasGetMany = method.name === 'get_list';
172172
if (hasGetOne || hasGetMany) {
173173
const dto = query2dto(sqlParser, method);
174-
// TODO: do we really need signature and cache?
174+
// LATER: do we really need signature and cache?
175175
const cacheKey = dto ? dto.signature : null;
176176
const dtoName = dtoInCache(dto) ? dtoCache[cacheKey] : dto.name;
177177
const dataType = hasGetMany ? '[]' + dtoName : dtoName;
178178
179179
const queryFunction = hasGetOne ? 'Get' : 'Select';
180-
// TODO: handle only particular method (get/post/put)
181-
// TODO: include method/path into an error message
180+
// LATER: handle only particular method (get/post/put)
181+
// LATER: include method/path into an error message
182182
%>
183183
r.Get("<%- path %>", func(w http.ResponseWriter, r *http.Request) {
184184
<%
@@ -215,7 +215,7 @@ endpoints.forEach(function(endpoint) {
215215
}
216216
if (method.name === 'post') {
217217
const dto = query2dto(sqlParser, method);
218-
// TODO: do we really need signature and cache?
218+
// LATER: do we really need signature and cache?
219219
const cacheKey = dto ? dto.signature : null;
220220
const dataType = dtoInCache(dto) ? dtoCache[cacheKey] : dto.name;
221221
%>
@@ -242,7 +242,7 @@ endpoints.forEach(function(endpoint) {
242242
}
243243
if (method.name === 'put') {
244244
const dto = query2dto(sqlParser, method);
245-
// TODO: do we really need signature and cache?
245+
// LATER: do we really need signature and cache?
246246
const cacheKey = dto ? dto.signature : null;
247247
const dataType = dtoInCache(dto) ? dtoCache[cacheKey] : dto.name;
248248
%>

0 commit comments

Comments
 (0)