mirror of
https://github.com/outbackdingo/databunker.git
synced 2026-01-28 02:18:43 +00:00
add new tests and fix small bugs
This commit is contained in:
@@ -113,24 +113,16 @@ func (e mainEnv) consentAccept(w http.ResponseWriter, r *http.Request, ps httpro
|
||||
switch records["expiration"].(type) {
|
||||
case string:
|
||||
expiration, _ = parseExpiration(value.(string))
|
||||
case int:
|
||||
expiration = value.(int32)
|
||||
case int32:
|
||||
expiration = value.(int32)
|
||||
case int64:
|
||||
expiration = value.(int32)
|
||||
case float64:
|
||||
expiration = int32(value.(float64))
|
||||
}
|
||||
}
|
||||
if value, ok := records["starttime"]; ok {
|
||||
switch records["starttime"].(type) {
|
||||
case string:
|
||||
starttime, _ = parseExpiration(value.(string))
|
||||
case int:
|
||||
starttime = value.(int32)
|
||||
case int32:
|
||||
starttime = value.(int32)
|
||||
case int64:
|
||||
starttime = value.(int32)
|
||||
case float64:
|
||||
starttime = int32(value.(float64))
|
||||
}
|
||||
}
|
||||
switch mode {
|
||||
|
||||
Reference in New Issue
Block a user