Skip to content

Commit 0b342b2

Browse files
author
Kevin Li
committed
Making some changes
1 parent cd49b5e commit 0b342b2

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

cmd/network.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,7 @@ func NewAPIRequest(r *Request, api string, args []string, isAsync bool) (map[str
205205
}
206206
params.Add("response", "json")
207207
params.Add("signatureversion", "3")
208-
expirationTime := time.Now().UTC().Add(15 * time.Minute)
209-
expirationStr := expirationTime.Format("2006-01-02T15:04:05Z")
210-
params.Add("expires", expirationStr)
208+
params.Add(expiresKey, time.Now().UTC().Add(15 * time.Minute).Format(time.RFC3339))
211209

212210
var encodedParams string
213211
var err error

config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ func saveConfig(cfg *Config) *Config {
284284
core.AutoComplete = true
285285
core.Output = JSON
286286
}
287-
if !conf.Section(ini.DEFAULT_SECTION).HasKey("postrequest") {
287+
if conf.Section(ini.DEFAULT_SECTION).HasKey("postrequest") {
288288
core.PostRequest = true
289289
}
290290
cfg.Core = core

0 commit comments

Comments
 (0)