From cd272dc2adad9ab9e5d4e95fbde3fb27e5b0bf19 Mon Sep 17 00:00:00 2001 From: Ivo_Tavares <110241614+ialvata@users.noreply.github.com> Date: Sun, 1 Oct 2023 10:58:31 +0100 Subject: [PATCH] Update schemas.py This change will make sure that we only allow 0 and 1. --- app/schemas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/schemas.py b/app/schemas.py index 183e47a..27b8731 100644 --- a/app/schemas.py +++ b/app/schemas.py @@ -63,4 +63,4 @@ class TokenData(BaseModel): class Vote(BaseModel): post_id: int - dir: conint(le=1) + dir: conint(ge=0, le=1)