Skip to content

fix: post edit/delete limited to 30m#82

Merged
ayush00git merged 5 commits into
mainfrom
fix/edit-post
Jun 3, 2026
Merged

fix: post edit/delete limited to 30m#82
ayush00git merged 5 commits into
mainfrom
fix/edit-post

Conversation

@ayush00git
Copy link
Copy Markdown
Owner

CLoses #81

used time.Since to check how time passed since the post was created, throuh the CreatedAt field, restricted the edit and delete post window to 30 minutes. Backend apis now sync responses to frontend to render the edit and delete icon at the frontend.

if time.Since(CreatedAt) >= 30 * time.Minute {
    c.JSON(403, ...)
    return
} 

@ayush00git ayush00git merged commit 58c33d5 into main Jun 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FIX] allow only specific time for editing the post once made

1 participant