We need to add expireAt to the Post model and the Post endpoints.
In a future ticket, we will add filtering on the backend to filter out expired posts before serving them to the FE.
When editing the post, the expireAt should be referenced from the time the person is editing the post, not the original time of posting.
I think the backend will apply filters based on query params that are sent by the frontend? Well that makes more sense to me anyway... maybe I didn't understand the requirements exactly, haven't looked at the designs for the feed in detail yet. ( in this case, expired looks like a default that should not be shown, similar to archived / soft delete )
That makes sense, thanks Robin. Updated the ticket
When creating the post, we set the expireAt (I suggest that name to keep the consistency with createdAt and updatedAt timestamps) at X time after the current date and then filtering it by the fronted params should be easy at the backend as @robinv85 said.
What is still not clear to me about this feature @dfrancks is when editing, what is the reference date? If the user edits a post and sets to expire "1 week", should we set it to 1 week from the date he is editing or 1 week from the date the post is created?
I think one week from editing makes more sense. I'll update the ticket.
@Naraujo13 this is also implemented on your posts PR right?
@Naraujo13 this is also implemented on your posts PR right?
Yes, I've added the expireAt at both posts endpoints, this should be solved with the posts migration.
@Naraujo13 should we close this ticket?
It's not done yet, but I will assign this issue to me and link it with the PR for Posts migration since it is being done there.
It is currently being reviewed.
@Naraujo13 - Can we please move to Done so that PM's can do UAT?
Sure, I moved it to QA thinking that was the state for that
Most helpful comment
That makes sense, thanks Robin. Updated the ticket