From 91e72f7a1b315ac9cfc67fe052ee9c7a7fdd9f99 Mon Sep 17 00:00:00 2001 From: KOSASIH Date: Sat, 10 Aug 2024 07:50:00 +0700 Subject: [PATCH] Create user.py --- .../pi_network/pi-stablecoin/services/user.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 blockchain_integration/pi_network/pi-stablecoin/services/user.py diff --git a/blockchain_integration/pi_network/pi-stablecoin/services/user.py b/blockchain_integration/pi_network/pi-stablecoin/services/user.py new file mode 100644 index 000000000..dc96977e1 --- /dev/null +++ b/blockchain_integration/pi_network/pi-stablecoin/services/user.py @@ -0,0 +1,19 @@ +from models import User + +class UserService: + def __init__(self): + self.users = [] + + def get_users(self): + return self.users + + def add_user(self, user): + self.users.append(user) + return self.users + + def validate_user(self, user): + if user.username == "": + return False + if user.password == "": + return False + return True