Skip to content

Commit

Permalink
refactor: cast db credentials port as integer (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianthedev committed Nov 11, 2021
1 parent 2262b6c commit 4c5a1a7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pages/api/data-sources/check-connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ async function handlePOST(req: NextApiRequest, res: NextApiResponse) {
}
}
} else {
// Cast port as int
credentials.port = parseInt(credentials.port);
// Get a new client
const client = getKnexClient(type, credentials);

Expand Down

1 comment on commit 4c5a1a7

@vercel
Copy link

@vercel vercel bot commented on 4c5a1a7 Nov 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.