Skip to content

Commit

Permalink
Merge pull request #208 from fonoster/fix/retrieve-trunks-issue
Browse files Browse the repository at this point in the history
Fix retrieve trunks issue
  • Loading branch information
psanders authored Aug 13, 2023
2 parents 7cebbca + 8623518 commit 76c9c93
Show file tree
Hide file tree
Showing 7 changed files with 20,937 additions and 11,130 deletions.
2 changes: 1 addition & 1 deletion mods/ctl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"shx": "^0.3.3",
"ts-node": "^10.9.1",
"tslib": "^2.4.1",
"typescript": "^4.9.4"
"typescript": "^4.9.5"
},
"oclif": {
"bin": "rctl",
Expand Down
2 changes: 1 addition & 1 deletion mods/pgdata/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ FROM node:16.15.1-alpine3.15 as migrations

WORKDIR /db

RUN npm install --location=global prisma@4.15.0 \
RUN npm install --location=global prisma@4.16.2 \
&& apk add --no-cache postgresql-client

COPY mods/pgdata/migrations migrations
Expand Down
863 changes: 565 additions & 298 deletions mods/pgdata/package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions mods/pgdata/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@opentelemetry/sdk-trace-base": "^1.0.4",
"@opentelemetry/sdk-trace-node": "^1.0.4",
"@opentelemetry/semantic-conventions": "^1.0.4",
"@prisma/client": "^4.8.0",
"@prisma/client": "^4.16.2",
"@routr/common": "^2.1.0",
"@routr/processor": "^2.1.6",
"google-protobuf": "^3.9.2",
Expand All @@ -55,7 +55,7 @@
"devDependencies": {
"@types/google-protobuf": "^3.15.6",
"@types/validator": "^13.7.10",
"prisma": "^4.8.0"
"prisma": "^4.16.2"
},
"gitHead": "1841d2d8d51bebfdc3af7e81435064e81b176449"
}
9 changes: 8 additions & 1 deletion mods/pgdata/src/api/find.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@ export function findBy(
const request = { [call.request.fieldName]: call.request.fieldValue }
const Manager = getManager(kind)

// WARNING: This function currently doesn't work for boolean or enum fields
// WARNING: As of Prisma 4.15.0, we can't pass string equivalents of booleans due to its internals.
// Previously, this was feasible. This workaround is temporary until find a better solution.
if (call.request.fieldValue === "true") {
request[call.request.fieldName] = true
} else if (call.request.fieldValue === "false") {
request[call.request.fieldName] = false
}

const items = (await operation({
where: request,
include: Manager.includeFields()
Expand Down
2 changes: 1 addition & 1 deletion mods/registry/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export async function findTrunks(apiClient: CC.APIClient) {
return (
await apiClient.trunks.findBy({
fieldName: "sendRegister",
fieldValue: "true"
fieldValue: true
})
).items
}
Expand Down
Loading

0 comments on commit 76c9c93

Please sign in to comment.