From 79196d13a0e8d053cb7a1caef9a48bf3575673df Mon Sep 17 00:00:00 2001 From: Umputun Date: Wed, 3 Jan 2018 23:30:29 -0600 Subject: [PATCH] fix duration check --- app/store/service.go | 2 +- remark.rest | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/store/service.go b/app/store/service.go index f3f1bc17..55a42ab9 100644 --- a/app/store/service.go +++ b/app/store/service.go @@ -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) } diff --git a/remark.rest b/remark.rest index 2eec031e..fa9096e7 100644 --- a/remark.rest +++ b/remark.rest @@ -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 {