mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Implementation of the new_password endpoint.
Found a way to create the token that does not need to persist it to the database. This requires proper error messages, written by people who speak menglis good.
This commit is contained in:
@@ -111,13 +111,6 @@ class Service(db.Model):
|
||||
return filter_null_value_fields(serialized)
|
||||
|
||||
|
||||
class PasswordResetToken(db.Model):
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
token = db.Column(db.String, unique=True, index=True, nullable=False)
|
||||
user_id = db.Column(db.Integer, db.ForeignKey('users.id'), unique=False, nullable=False)
|
||||
expiry_date = db.Column(db.DateTime, nullable=False)
|
||||
|
||||
|
||||
def filter_null_value_fields(obj):
|
||||
return dict(
|
||||
filter(lambda x: x[1] is not None, obj.items())
|
||||
|
||||
Reference in New Issue
Block a user