Giter Club home page Giter Club logo

Comments (13)

mrfamouskk7 avatar mrfamouskk7 commented on June 1, 2024 1

I think both the ways should okay:

  • Single API with body
  • Separate APIs without body

But it seems unusual/unconventional to have PUT/POST request without body.
Single API with body should be the ideal way to implement.

from notykt.

PatilShreyas avatar PatilShreyas commented on June 1, 2024 1

I think both the ways should okay:

  • Single API with body
  • Separate APIs without body

But it seems unusual/unconventional to have PUT/POST request without body.
Single API with body should be the ideal way to implement.

Makes sense!

from notykt.

mrfamouskk7 avatar mrfamouskk7 commented on June 1, 2024

Heyy @PatilShreyas I can take this up... should I start working on this feature??

from notykt.

PatilShreyas avatar PatilShreyas commented on June 1, 2024

Thanks for showing interest in contributing this @mrfamouskk7. Sure, Assigning this to you.

from notykt.

mrfamouskk7 avatar mrfamouskk7 commented on June 1, 2024

Thanks for showing interest in contributing this @mrfamouskk7. Sure, Assigning this to you.

Thanks @PatilShreyas

from notykt.

PatilShreyas avatar PatilShreyas commented on June 1, 2024

Let me know if you need any help in setting up this project locally.

from notykt.

mrfamouskk7 avatar mrfamouskk7 commented on June 1, 2024

Actually, I am done with local setup.
I just had a question, so isPinned flag will be required while fetching notes as well right? So should I include that in same PR??

from notykt.

PatilShreyas avatar PatilShreyas commented on June 1, 2024

Yes, it'll be required to have isPinned flag in all notes response. If you're fine with doing it in the same PR, then okay. Otherwise we can also have a dedicated PR for that.

from notykt.

PatilShreyas avatar PatilShreyas commented on June 1, 2024

@mrfamouskk7 Current API looks good to you?

Otherwise, we can also have two API endpoints for pin and unpin operations.

Like,

  • PUT /note/{noteId}/pin
  • PUT /note/{noteId}/unpin

This will not require a request body.

WDYT?

from notykt.

mrfamouskk7 avatar mrfamouskk7 commented on June 1, 2024

Yes, it'll be required to have isPinned flag in all notes response. If you're fine with doing it in the same PR, then okay. Otherwise we can also have a dedicated PR for that.

I will include in the same PR

from notykt.

mrfamouskk7 avatar mrfamouskk7 commented on June 1, 2024

Heyy Shreyash, so I have a couple of suggestions:

  • Pinning API can be changed from PUT request to a PATCH request. PATCH is more suitable because we are not updating the complete resource here.
  • A new field updated can be added to notes so that the most recent pinned note will be at the top

WDYT?

from notykt.

PatilShreyas avatar PatilShreyas commented on June 1, 2024

@mrfamouskk7 this sounds good to me. Definitely we can have updated field

from notykt.

mrfamouskk7 avatar mrfamouskk7 commented on June 1, 2024

Sure... I will add those changes in the same PR 👍

from notykt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.