From 008f0b2cf6235ad8dfd9d57b8d92e36efc2dff97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= <40151420+ldericher@users.noreply.github.com> Date: Thu, 31 Mar 2022 16:34:36 +0000 Subject: [PATCH] require email field --- api/kiwi_vpn_api/db/user.py | 2 +- api/kiwi_vpn_api/easyrsa.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/kiwi_vpn_api/db/user.py b/api/kiwi_vpn_api/db/user.py index 7011545..40ec9b2 100644 --- a/api/kiwi_vpn_api/db/user.py +++ b/api/kiwi_vpn_api/db/user.py @@ -22,7 +22,7 @@ class UserBase(SQLModel): """ name: str = Field(primary_key=True) - email: str | None = Field(default=None) + email: str country: str | None = Field(default=None, max_length=2) state: str | None = Field(default=None) diff --git a/api/kiwi_vpn_api/easyrsa.py b/api/kiwi_vpn_api/easyrsa.py index bfa86f3..6322af0 100644 --- a/api/kiwi_vpn_api/easyrsa.py +++ b/api/kiwi_vpn_api/easyrsa.py @@ -26,7 +26,7 @@ class DistinguishedName(BaseModel): city: str organization: str organizational_unit: str - email: str | None + email: str common_name: str @classmethod