adventurelookup-backend icon indicating copy to clipboard operation
adventurelookup-backend copied to clipboard

Add/edit an adventure

Open probably-not-a-cat opened this issue 8 years ago • 10 comments

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

probably-not-a-cat avatar Jun 01 '16 01:06 probably-not-a-cat

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.

probably-not-a-cat avatar Jun 01 '16 01:06 probably-not-a-cat

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

pejter avatar Jun 08 '16 12:06 pejter

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

probably-not-a-cat avatar Jun 08 '16 12:06 probably-not-a-cat

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

pejter avatar Jun 08 '16 12:06 pejter

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.

probably-not-a-cat avatar Jun 08 '16 13:06 probably-not-a-cat

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?

whonut avatar Jun 09 '16 10:06 whonut

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

probably-not-a-cat avatar Jun 09 '16 12:06 probably-not-a-cat

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

whonut avatar Jun 10 '16 12:06 whonut

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..

pejter avatar Jun 10 '16 13:06 pejter

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.

whonut avatar Jun 13 '16 21:06 whonut