ソースを参照

set token on new client for api post

pull/36/head
Rob Loranger 4年前
コミット
86e9757c4b
この署名に対応する既知のキーがデータベースに存在しません GPGキーID: D6F1633A4F0903B8
1個のファイルの変更7行の追加0行の削除
  1. +7
    -0
      api/api.go

+ 7
- 0
api/api.go ファイルの表示

@@ -105,6 +105,13 @@ func DoPost(c *cli.Context, post []byte, font string, encrypt, code bool) (*writ
return nil, fmt.Errorf("%v", err)
}

u, _ := config.LoadUser(c)
if u != nil && c.App.Name == "wf" {
cl.SetToken(u.AccessToken)
} else {
return nil, fmt.Errorf("Not currently logged in. Authenticate with: " + executable.Name() + " auth <username>")
}

pp := &writeas.PostParams{
Font: config.GetFont(code, font),
Collection: config.Collection(c),


読み込み中…
キャンセル
保存