fix duration check

This commit is contained in:
Umputun
2018-01-03 23:30:29 -06:00
parent d57b86b590
commit 79196d13a0
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
View File
@@ -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
{