Skip to content

Commit 08a9909

Browse files
committed
refactor(python): move GET specific code close to its usage
1 parent 98a1ed3 commit 08a9909

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/templates/routes.py.ejs

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ endpoints.forEach(function(endpoint) {
168168
169169
// LATER: add support for aggregated_queries (#17)
170170
const argsFromQuery = method.query ? extractParamsFromQuery(method.query).map(stipOurPrefixes) : []
171-
const methodArgs = Array.from(new Set([...argsFromPath, ...argsFromQuery, 'conn=Depends(db_connection)']))
172171
173172
if (hasGetOne || hasGetMany) {
173+
const methodArgs = Array.from(new Set([...argsFromPath, ...argsFromQuery, 'conn=Depends(db_connection)']))
174174
175175
const queriesWithNames = []
176176
if (method.query) {

0 commit comments

Comments
 (0)