mirror of
https://github.com/fiatjaf/nak.git
synced 2024-10-30 09:09:08 -04:00
verify: accept event to be verified as json argument.
This commit is contained in:
parent
e89823b10e
commit
347a82eaa9
|
@ -15,7 +15,7 @@ var verify = &cli.Command{
|
||||||
|
|
||||||
it outputs nothing if the verification is successful.`,
|
it outputs nothing if the verification is successful.`,
|
||||||
Action: func(c *cli.Context) error {
|
Action: func(c *cli.Context) error {
|
||||||
for stdinEvent := range getStdinLinesOrBlank() {
|
for stdinEvent := range getStdinLinesOrFirstArgument(c.Args().First()) {
|
||||||
evt := nostr.Event{}
|
evt := nostr.Event{}
|
||||||
if stdinEvent != "" {
|
if stdinEvent != "" {
|
||||||
if err := json.Unmarshal([]byte(stdinEvent), &evt); err != nil {
|
if err := json.Unmarshal([]byte(stdinEvent), &evt); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user