Skip to content

Commit

Permalink
fix unit test and validator
Browse files Browse the repository at this point in the history
  • Loading branch information
LucienShui committed Oct 7, 2021
1 parent 7bffb7c commit 3ed0352
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion handler/paste/paste_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func creatTestCaseGenerator() map[string]testCase {
"lang": "python",
"password": password,
"self_destruct": pasteType != "permanent",
"expire_second": 1,
"expire_second": 60,
"expire_count": 1,
},
map[string]string{},
Expand Down
2 changes: 1 addition & 1 deletion handler/paste/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func authenticator(body CreateRequest) *common.ErrorResponse {
if body.ExpireCount > 1 {
return common.ErrUnauthorized
}
if body.ExpireSecond > 5 {
if body.ExpireSecond > 5 * 60 {
return common.ErrUnauthorized
}
}
Expand Down

0 comments on commit 3ed0352

Please sign in to comment.