From 13f027c8a10da64c992dbd1234a98e20d67e34c9 Mon Sep 17 00:00:00 2001 From: Umputun Date: Sun, 4 Feb 2018 15:05:44 -0600 Subject: [PATCH] conf duration in secs --- app/rest/server.go | 4 ++-- remark.rest | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/rest/server.go b/app/rest/server.go index a1679a18..979132cd 100644 --- a/app/rest/server.go +++ b/app/rest/server.go @@ -318,14 +318,14 @@ func (s *Server) findUserCommentsCtrl(w http.ResponseWriter, r *http.Request) { func (s *Server) configCtrl(w http.ResponseWriter, r *http.Request) { type config struct { Version string - EditDuration time.Duration + EditDuration int Admins []string Auth []string } cnf := config{ Version: s.Version, - EditDuration: s.DataService.EditDuration, + EditDuration: int(s.DataService.EditDuration.Seconds()), Admins: s.Admins, } authNames := []string{} diff --git a/remark.rest b/remark.rest index 4c50e16e..72fd9132 100644 --- a/remark.rest +++ b/remark.rest @@ -52,3 +52,6 @@ GET {{host}}/api/v1/count?site=remark&url=https://radio-t.com/p/2017/12/16/podca ### list commented posts GET {{host}}/api/v1/list?site=remark + +### get config +GET {{host}}/api/v1/config