Files
ax/cmd/inbox.go

29 lines
465 B
Go
Raw Normal View History

2026-03-26 12:48:47 +00:00
package cmd
import (
"axolotl/db"
"axolotl/output"
"github.com/spf13/cobra"
)
var inboxCmd = &cobra.Command{
Use: "inbox",
Short: "Show your inbox",
Run: func(cmd *cobra.Command, args []string) {
d, err := db.GetDB()
user := db.GetCurrentUser()
nodes, err := d.ListNodes(db.ListFilter{
Inbox: user,
})
if err != nil {
return
}
output.PrintNodes(cmd.OutOrStdout(), nodes, jsonFlag)
},
}
func init() {
rootCmd.AddCommand(inboxCmd)
}