learnhubmk / api

The API project for LearnHub.mk
MIT License
5 stars 0 forks source link

[BE] Implement Blog Content Management APIs #72

Closed davorminchorov closed 3 months ago

davorminchorov commented 5 months ago

Business Requirements

As an administrator or content manager, I want to be able to manage the blog posts on the website.

Acceptance Criteria

Related issue:

https://github.com/learnhubmk/api/issues/115

nikoladomazetovikj commented 5 months ago

@davorminchorov There should be an endpoint which will publish or unpublish a blog post from the website

I think there is no need for a separate endpoint, this also can be done by update API as it will be a PATCH method, we will just change the status column

davorminchorov commented 5 months ago

@nikoladomazetovikj I added that line because it will be easier to separate the use case, otherwise you will have to do a bunch of checks in the normal update endpoint in order to know what's happening.

Another downside is that you will have to either send all of the data every time you change a single column or other magical stuff to handle situations where the other columns are not affected in that single use case.

If it's easier for you to reuse the update endpoint, go for it, there's no problem with that approach either. It's up to you to decide.