This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
devicehub-teal/ereuse_devicehub/modules/dpp/users.py

10 lines
279 B
Python
Raw Normal View History

2023-06-16 10:39:03 +00:00
from ereuse_devicehub.db import db
from ereuse_devicehub.resources.user.models import User
def set_dlt_user(email, password):
u = User.query.filter_by(email=email).one()
api_token = u.set_new_dlt_keys(password)
u.allow_permitions(api_token)
db.session.commit()