Improved endpoint to edit user data

This commit is contained in:
Marcin-Ramotowski
2025-03-16 13:18:25 +00:00
parent 0cd57c0973
commit 8bb71309ea
2 changed files with 26 additions and 12 deletions

View File

@ -11,6 +11,9 @@ class User(db.Model):
def to_dict(self):
return {"id": self.id, "username": self.username, "email": self.email, "role": self.role}
def get_editable_fields():
return {"username", "email", "role", "password"}
class Task(db.Model):
id = db.Column(db.Integer, primary_key=True, autoincrement=True)