Преглед изворни кода

Support updating auth'd user posts

pull/21/head
Matt Baer пре 5 година
родитељ
комит
40880f3167
1 измењених фајлова са 2 додато и 1 уклоњено
  1. +2
    -1
      cmd/writeas/commands.go

+ 2
- 1
cmd/writeas/commands.go Прегледај датотеку

@@ -124,10 +124,11 @@ func cmdUpdate(c *cli.Context) error {
return cli.NewExitError("usage: writeas update <postId> [<token>]", 1)
}

u, _ := loadUser()
if token == "" {
// Search for the token locally
token = tokenFromID(friendlyID)
if token == "" {
if token == "" && u == nil {
Errorln("Couldn't find an edit token locally. Did you create this post here?")
ErrorlnQuit("If you have an edit token, use: writeas update %s <token>", friendlyID)
}


Loading…
Откажи
Сачувај