CodeForBaltimore / CitySync

Bringing together Baltimore non-profits with smart data.
Apache License 2.0
1 stars 3 forks source link

Paginates response to all query if optional param sent #12

Closed mepps closed 4 years ago

mepps commented 4 years ago

Description

Paginates the response to /orgs/all if optional page parameter is passed

Related Issues

List related Issues: (https://github.com/CodeForBaltimore/CitySync/issues/8)

Todos

Steps to Test or Reproduce

Outline the steps to test or reproduce the PR here.

curl -X GET http://localhost:5000/api/orgs/all?page=1

Impacted Areas in Application

List general components of the application that this PR will affect:

mepps commented 4 years ago

Hmm locally this is actually working correctly..

mepps commented 4 years ago

When requesting curl -X GET http://localhost:5000/api/orgs/all?page=500, I get starting id 4991 and ending 5000. With page=1 i get starting id=1 and ending id 10.

SavSanta commented 4 years ago

Hmm, i wonder why. Let me reset my webserver and try it again!

SavSanta commented 4 years ago

I pulled and spun up a new docker container with your changes in views.py and still am not getting the expected actions. Did anything else change?

SavSanta commented 4 years ago

I see the database changed? Let me try with that one

mepps commented 4 years ago

Weird! I didn't make any other changes..

On Thu, Mar 12, 2020 at 1:49 PM Ru Uba notifications@github.com wrote:

I see the database changed? Let me try with that one

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/CodeForBaltimore/CitySync/pull/12#issuecomment-598333016, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBT4GOWSWWF2X2VZ3HVRPDRHEODVANCNFSM4LGQG3LA .

mepps commented 4 years ago

Maybe I'll try it with the new db if that's ready.

On Thu, Mar 12, 2020 at 1:50 PM Maggie Epps maggie.epps@gmail.com wrote:

Weird! I didn't make any other changes..

On Thu, Mar 12, 2020 at 1:49 PM Ru Uba notifications@github.com wrote:

I see the database changed? Let me try with that one

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/CodeForBaltimore/CitySync/pull/12#issuecomment-598333016, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBT4GOWSWWF2X2VZ3HVRPDRHEODVANCNFSM4LGQG3LA .

mepps commented 4 years ago

Oh I misread that as the postgres db being ready to use..

On Thu, Mar 12, 2020 at 2:04 PM Maggie Epps maggie.epps@gmail.com wrote:

Maybe I'll try it with the new db if that's ready.

On Thu, Mar 12, 2020 at 1:50 PM Maggie Epps maggie.epps@gmail.com wrote:

Weird! I didn't make any other changes..

On Thu, Mar 12, 2020 at 1:49 PM Ru Uba notifications@github.com wrote:

I see the database changed? Let me try with that one

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/CodeForBaltimore/CitySync/pull/12#issuecomment-598333016, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBT4GOWSWWF2X2VZ3HVRPDRHEODVANCNFSM4LGQG3LA .

SavSanta commented 4 years ago

I think the DB was fine. It was mentioned as "changed" but it wasnt it just was included in the commit is why it came as changed. Can you check your Slack? I'm puzzled as to what the issue is and would like to screenshare