fix duration check
This commit is contained in:
@@ -58,7 +58,7 @@ func (s *Service) EditComment(locator Locator, commentID string, text string, ed
|
||||
}
|
||||
|
||||
// edit allowed in editDuration window only
|
||||
if comment.Timestamp.Add(editDuration).After(time.Now()) {
|
||||
if comment.Timestamp.Add(editDuration).Before(time.Now()) {
|
||||
return comment, errors.Errorf("too late to edit %s", commentID)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ Content-Type: application/json
|
||||
}
|
||||
|
||||
### update comment
|
||||
POST https://demo.remark42.com/api/v1/comment/a2ddb8d2f65008ee1a1e3af8df0f26beb042309c?site=remark&url=https://radio-t.com/blah1
|
||||
PUT https://demo.remark42.com/api/v1/comment/fb04757c0dbbe3e77b0e85e532e259d816cbaacc?site=remark&url=https://radio-t.com/blah1
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user