Added minimum year
This commit is contained in:
parent
953d95c6aa
commit
199512dbc9
@ -10,6 +10,8 @@ import (
|
|||||||
"github.com/animenotifier/notify.moe/utils"
|
"github.com/animenotifier/notify.moe/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const minYear = 1963
|
||||||
|
|
||||||
// Get ...
|
// Get ...
|
||||||
func Get(ctx *aero.Context) string {
|
func Get(ctx *aero.Context) string {
|
||||||
user := utils.GetUser(ctx)
|
user := utils.GetUser(ctx)
|
||||||
@ -21,7 +23,9 @@ func Get(ctx *aero.Context) string {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if anime.StartDateTime().Year() > maxYear {
|
year := anime.StartDateTime().Year()
|
||||||
|
|
||||||
|
if year > maxYear || year < minYear {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user