Return not found for more recently deleted servers, too
This commit is contained in:
16
ntpdb/server.go
Normal file
16
ntpdb/server.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package ntpdb
|
||||
|
||||
import "time"
|
||||
|
||||
func (s *Server) DeletionAge(dur time.Duration) bool {
|
||||
if !s.DeletionOn.Valid {
|
||||
return false
|
||||
}
|
||||
if dur > 0 {
|
||||
dur = dur * -1
|
||||
}
|
||||
if s.DeletionOn.Time.Before(time.Now().Add(dur)) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
Reference in New Issue
Block a user