mirror of
https://github.com/unmojang/drasl.git
synced 2025-08-03 10:56:06 -04:00
api: fix IsDeprecatedAPIPath
This commit is contained in:
parent
1f48320a2f
commit
da3ef3cee5
5
api.go
5
api.go
@ -100,10 +100,9 @@ func IsDeprecatedAPIPath(path_ string) mo.Option[int] {
|
||||
match := re.FindStringSubmatch(split[3])
|
||||
if len(match) == 2 {
|
||||
version, err := strconv.Atoi(match[1])
|
||||
if err != nil {
|
||||
return mo.None[int]()
|
||||
if err == nil && version != API_MAJOR_VERSION {
|
||||
return mo.Some(version)
|
||||
}
|
||||
return mo.Some(version)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user