mirror of
https://github.com/unmojang/drasl.git
synced 2025-09-07 06:06:02 -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])
|
match := re.FindStringSubmatch(split[3])
|
||||||
if len(match) == 2 {
|
if len(match) == 2 {
|
||||||
version, err := strconv.Atoi(match[1])
|
version, err := strconv.Atoi(match[1])
|
||||||
if err != nil {
|
if err == nil && version != API_MAJOR_VERSION {
|
||||||
return mo.None[int]()
|
return mo.Some(version)
|
||||||
}
|
}
|
||||||
return mo.Some(version)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user