fix ID
This commit is contained in:
parent
aef736e991
commit
a7e10ddba4
|
@ -3,7 +3,6 @@ package main
|
|||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"strconv"
|
||||
|
||||
"github.com/mattn/go-mastodon"
|
||||
"github.com/urfave/cli"
|
||||
|
@ -15,11 +14,7 @@ func cmdDelete(c *cli.Context) error {
|
|||
return errors.New("arguments required")
|
||||
}
|
||||
for i := 0; i < c.NArg(); i++ {
|
||||
id, err := strconv.ParseInt(c.Args().Get(i), 10, 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = client.DeleteStatus(context.Background(), id)
|
||||
err := client.DeleteStatus(context.Background(), mastodon.ID(c.Args().Get(i)))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user