fixed db name in query
This commit is contained in:
parent
f72dd027b0
commit
6c31d90278
|
|
@ -2,8 +2,8 @@ import { pagination } from "../../utils/pagination";
|
||||||
//reports repository
|
//reports repository
|
||||||
const _userHasPlacesSelectQuery = (_pagination = '') => ({ count }) => ({ uuid, uuidUser, uuidPlace, uuidReportType }) => {
|
const _userHasPlacesSelectQuery = (_pagination = '') => ({ count }) => ({ uuid, uuidUser, uuidPlace, uuidReportType }) => {
|
||||||
const uuidCondition = uuid ? 'AND up.uuid = :uuid ' : '';
|
const uuidCondition = uuid ? 'AND up.uuid = :uuid ' : '';
|
||||||
const uuidUserCondition = uuidUser ? 'AND up.fk_user = (SELECT id FROM mydb.users WHERE uuid = :uuidUser)' : '';
|
const uuidUserCondition = uuidUser ? 'AND up.fk_user = (SELECT id FROM acloc.users WHERE uuid = :uuidUser)' : '';
|
||||||
const uuidPlaceCondition = uuidPlace ? 'AND up.fk_place = (SELECT id FROM mydb.places WHERE uuid = :uuidPlace)' : '';
|
const uuidPlaceCondition = uuidPlace ? 'AND up.fk_place = (SELECT id FROM acloc.places WHERE uuid = :uuidPlace)' : '';
|
||||||
const uuidReportTypeCondition = uuidReportType ? 'AND up.fk_report_type = (SELECT id FROM acloc.report_types WHERE uuid = :uuidReportType)' : '';
|
const uuidReportTypeCondition = uuidReportType ? 'AND up.fk_report_type = (SELECT id FROM acloc.report_types WHERE uuid = :uuidReportType)' : '';
|
||||||
|
|
||||||
return `
|
return `
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue