1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-24 07:39:41 +02:00
* fix #1144

* fix type checks

* refactor test routes package

* fix #1208

* unify test routes into module
This commit is contained in:
Hayden 2022-05-07 20:08:04 -08:00 committed by GitHub
parent 07f6446526
commit 68f7efc177
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 189 additions and 148 deletions

View file

@ -0,0 +1,17 @@
from pydantic import UUID4
def v1(route: str) -> str:
return f"/api{route}"
class RoutesBase:
prefix = "/api"
base = f"{prefix}/"
def __init__(self) -> None:
raise NotImplementedError("This class is not meant to be instantiated.")
@classmethod
def item(cls, item_id: int | str | UUID4) -> str:
return f"{cls.base}/{item_id}"