Skip to content

Conversation

@Aminata00
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@LucasIversen LucasIversen left a comment

Choose a reason for hiding this comment

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

Hi Aminata. There's a couple of things you could fix here, but you should only do it if you feel it's worth while since it's been so long since this was due :)

let query= knexInstance.select("*").from("contacts");

if ("sort" in req.query){
const order = req.query.sort.toString;
Copy link
Collaborator

Choose a reason for hiding this comment

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

toString()*


console.log("SQL", query.toSQL().sql);

try {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is placed outside the handler. It needs to be inside the contactsAPIRouter.get('/',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants