Skip to content

Nodejs week3/aminata #243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Nodejs week3/aminata #243

wants to merge 2 commits into from

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.

2 participants