aboutsummaryrefslogtreecommitdiff
path: root/internal/api/entry.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/entry.go')
-rw-r--r--internal/api/entry.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/api/entry.go b/internal/api/entry.go
index 1355fa3b..e6c00e3a 100644
--- a/internal/api/entry.go
+++ b/internal/api/entry.go
@@ -283,6 +283,12 @@ func (h *handler) fetchContent(w http.ResponseWriter, r *http.Request) {
json.OK(w, r, map[string]string{"content": entry.Content})
}
+func (h *handler) flushHistory(w http.ResponseWriter, r *http.Request) {
+ loggedUserID := request.UserID(r)
+ go h.store.FlushHistory(loggedUserID)
+ json.Accepted(w, r)
+}
+
func configureFilters(builder *storage.EntryQueryBuilder, r *http.Request) {
if beforeEntryID := request.QueryInt64Param(r, "before_entry_id", 0); beforeEntryID > 0 {
builder.BeforeEntryID(beforeEntryID)