Skip to content

Commit

Permalink
feat(grower-detail): display device manufacturer with device id (#600)
Browse files Browse the repository at this point in the history
  • Loading branch information
gwynndp authored Nov 13, 2021
1 parent 38f071b commit 7136c9a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/controllers/planterRegistration.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export class PlanterRegistrationController {
): Promise<PlanterRegistration[]> {
// console.log('/planter-registration', filter ? filter.where : null);

const sql = `SELECT * FROM planter_registrations
const sql = `SELECT planter_registrations.*, devices.manufacturer FROM planter_registrations
JOIN devices ON devices.android_id=planter_registrations.device_identifier
LEFT JOIN (
SELECT
region.name AS country,
Expand Down
2 changes: 2 additions & 0 deletions src/js/buildFilterQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,7 @@ export function buildFilterQuery(selectStmt, params) {
}
}

// console.log('QUERY ---------', query);

return query;
}

0 comments on commit 7136c9a

Please sign in to comment.