Major refactoring: Add user id to API routes
This commit is contained in:
@@ -178,7 +178,11 @@ function sqlGenerator({ tableName, genObject }) {
|
||||
}
|
||||
|
||||
if (genObject.order)
|
||||
queryString += ` ORDER BY ${genObject.order.field} ${genObject.order.strategy}`;
|
||||
queryString += ` ORDER BY ${
|
||||
genObject.join
|
||||
? `${tableName}.${genObject.order.field}`
|
||||
: genObject.order.field
|
||||
} ${genObject.order.strategy}`;
|
||||
if (genObject.limit) queryString += ` LIMIT ${genObject.limit}`;
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user