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

API somewhat broken... #13

Open
314parley opened this Issue Jan 28, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@314parley
Owner

314parley commented Jan 28, 2016

if you look at the posts API, the OP post isn't displaying. @grumpy-anonsaba said it might be an issue with the SQL query, We'd have to experiment locally.

@grumpy-anonsaba

This comment has been minimized.

Show comment
Hide comment
@grumpy-anonsaba

grumpy-anonsaba Jan 28, 2016

Collaborator

Will be debugging hopefully tonight.

Collaborator

grumpy-anonsaba commented Jan 28, 2016

Will be debugging hopefully tonight.

@grumpy-anonsaba grumpy-anonsaba self-assigned this Jan 28, 2016

@grumpy-anonsaba

This comment has been minimized.

Show comment
Hide comment
@grumpy-anonsaba

grumpy-anonsaba Jan 28, 2016

Collaborator

@grumpy-anonsaba said it might be an issue with the SQL query

I came to this conclusion because...

In the Post API file you'll notice it says (laymen terms)

If this respond to ID is null then the respond to ID is the ID.
Simple enough right?

Wrong...
Declaring values inside of a for/while loop is asking for trouble.

Therefore this value is never set thus the "OP" post has a null resto value which is what the API uses to build that specific post (it appears anyways). Which means that it doesn't exist therefor you get the null response from the database.

Collaborator

grumpy-anonsaba commented Jan 28, 2016

@grumpy-anonsaba said it might be an issue with the SQL query

I came to this conclusion because...

In the Post API file you'll notice it says (laymen terms)

If this respond to ID is null then the respond to ID is the ID.
Simple enough right?

Wrong...
Declaring values inside of a for/while loop is asking for trouble.

Therefore this value is never set thus the "OP" post has a null resto value which is what the API uses to build that specific post (it appears anyways). Which means that it doesn't exist therefor you get the null response from the database.

@314parley

This comment has been minimized.

Show comment
Hide comment
@314parley

314parley Jan 28, 2016

Owner

Maybe change the query for the API to where if resto = 0 temporarily change it to res?

Owner

314parley commented Jan 28, 2016

Maybe change the query for the API to where if resto = 0 temporarily change it to res?

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