aboutsummaryrefslogtreecommitdiffhomepage
path: root/cli/flush_sessions.go
diff options
context:
space:
mode:
Diffstat (limited to 'cli/flush_sessions.go')
-rw-r--r--cli/flush_sessions.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/cli/flush_sessions.go b/cli/flush_sessions.go
new file mode 100644
index 0000000..06a56d0
--- /dev/null
+++ b/cli/flush_sessions.go
@@ -0,0 +1,20 @@
+// Copyright 2018 Frédéric Guillot. All rights reserved.
+// Use of this source code is governed by the Apache 2.0
+// license that can be found in the LICENSE file.
+
+package cli
+
+import (
+ "fmt"
+ "os"
+
+ "github.com/miniflux/miniflux/storage"
+)
+
+func flushSessions(store *storage.Storage) {
+ fmt.Println("Flushing all sessions (disconnect users)")
+ if err := store.FlushAllSessions(); err != nil {
+ fmt.Println(err)
+ os.Exit(1)
+ }
+}