AdventureLookup / adventurelookup-backend

Platform, Framework, Database software
GNU General Public License v3.0
28 stars 7 forks source link

Add/edit an adventure #20

Open probably-not-a-cat opened 8 years ago

probably-not-a-cat commented 8 years ago

Have an api that can add/edit information about an adventure to our database.

probably-not-a-cat commented 8 years ago

I haven't worked on this directly, but I have already worked on serializing objects which allow for easy transforming from JSON to object (and vice versa), and would make this much easier. So If someone wants to jump on this asap, I can do a PR for my serializer.

pejter commented 8 years ago

Make a PR, so we can see the progress and start working on this.

probably-not-a-cat commented 8 years ago

Are we planning on using Serializing objects? I thought we decided against them since they have unnecessary overhead.

pejter commented 8 years ago

I wasn't aware of that. Must've missed the discussion on Discord.

probably-not-a-cat commented 8 years ago

Well comparing https://github.com/AdventureLookup/adventurelookup-backend/pull/23 to my serializing objects version, I find the PR to be much simpler and cleaner. I could push my code so that we can compare.

whonut commented 8 years ago

Do we have a final decision on whether we're requiring user login for this? If so, does an endpoint for that need doing first?

probably-not-a-cat commented 8 years ago

The current plan is to have a login for this. I am not sure what it would take to implement that.

whonut commented 8 years ago

I'd be happy to give this a shot, my main worry is doing authentication and/or CSRF protection wrong.

pejter commented 8 years ago

Well probably do OAuth IIRC, so that'll need to be implemented, but I think it should be a part of the parent view that handles generic requests. The CRUD views will inherit from that generic JSONResponse view that will also provide authentication wherever necessary..

whonut commented 8 years ago

I'm starting to work on adding adventures. How are we handling authors? Do we create a new Author object for authors we don't recognise? That seems like the most sane thing to do to me, but I might be wrong.