Skip to content

Commit

Permalink
Fixed minor expiry bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin committed Jul 8, 2014
1 parent 2ee8bf6 commit a839f1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

config.vm.network :forwarded_port, guest: 8080, host: 8080
config.vm.network :forwarded_port, guest: 6379, host: 6379
config.vm.network :forwarded_port, guest: 5000, host: 5000


# Create a private network, which allows host-only access to the machine
Expand Down
4 changes: 4 additions & 0 deletions api_definition.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@ func (a *ApiSpec) IsThisApiVersionExpired(versionDef VersionInfo) bool {
return false
}

if versionDef.Expires == "" {
return false
}

// otherwise - calculate the time
t, err := time.Parse("2006-01-02 15:04", versionDef.Expires)
if err != nil {
Expand Down

0 comments on commit a839f1a

Please sign in to comment.