From da3ef3cee5f4a78e66e03e82d6760f1375331f95 Mon Sep 17 00:00:00 2001 From: Evan Goode Date: Sun, 2 Feb 2025 22:08:49 -0500 Subject: [PATCH] api: fix IsDeprecatedAPIPath --- api.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/api.go b/api.go index 3406893..223c505 100644 --- a/api.go +++ b/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) } }