Skip to content

Fix api#21

Open
lillykml wants to merge 3 commits into
masterfrom
fix-api
Open

Fix api#21
lillykml wants to merge 3 commits into
masterfrom
fix-api

Conversation

@lillykml

@lillykml lillykml commented Sep 2, 2021

Copy link
Copy Markdown
Collaborator

I had the issue that I didn't get any recipes if I didn't add additional ingredients. Then I saw that we join them basically like this f"{list_a}", {list_b}" which gives results like "tomato, "
Also I took out the offset parameter to get better results, since we anyway display only 3 results

@lillykml lillykml left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Btw I'm not sure what the second commit means the merge branch master, so pls make sure I don't break anything :D - I don't remember merging anything tbh

# This is a bit risky in cases where less recipes were found than the offset value;
# --> the API is then returning no recipes.
"offset": offset}
#"offset": offset

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I added this for good reasons: to get (hopefully) different results every time the user is clicking the button. Without the offset, the user will always see the same recipes when no options are changed.

@kickermeister

Copy link
Copy Markdown
Collaborator

I'm surprised that the API has an issue with something like "tomatoe, " since it expects the parameter here as. comma-separated value anyway.. however, if it works more reliable that way I'm fine with it.

The offset parameter, however, would I prefer to keep.

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