mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-10-28 16:54:19 -04:00
Fix Users API Token API path (#526)
* Fix Users API Token API path * Change CRLF to LF * Fix route generation when route contains /api
This commit is contained in:
@@ -29,7 +29,7 @@ JS_DIR.mkdir(exist_ok=True, parents=True)
|
||||
class RouteObject:
|
||||
def __init__(self, route_string) -> None:
|
||||
self.prefix = "/" + route_string.split("/")[1]
|
||||
self.route = route_string.replace(self.prefix, "")
|
||||
self.route = "/" + route_string.split("/", 2)[2]
|
||||
self.js_route = self.route.replace("{", "${")
|
||||
self.parts = route_string.split("/")[1:]
|
||||
self.var = re.findall(r"\{(.*?)\}", route_string)
|
||||
|
||||
Reference in New Issue
Block a user