cheetahapi/core/db/db_authenticate.py
def create_new_token(self, user_id):
        """
        Creates a new token in the database for the user id
        :param user_id: Integer user id
        :return: String token
        """
        token_string = uuid.uuid4().hex
        token = Token()
        token.user_id = user_id
        token.token = token_string
        self.session.add(token)
        self.session.commit()
        return token_string

        Creates a new token in the database for the user id
        :param user_id: Integer user id
        :return: String token
        
Creates a new token in the database for the user id
Creates a new token in the database for the user id
def create_new_token(self, user_id):
        token_string = uuid.uuid4().hex
        token = Token()
        token.user_id = user_id
        token.token = token_string
        self.session.add(token)
        self.session.commit()
        return token_string
def create_new_token ( self , user_id ) : token_string = uuid . uuid4 ( ) . hex token = Token ( ) token . user_id = user_id token . token = token_string self . session . add ( token ) self . session . commit ( ) return token_string
Creates a new token in the database for the user id
Creates a new token in the database for the user id
"""
        Creates a new token in the database for the user id
        :param user_id: Integer user id
        :return: String token
        """
None
self
user_id
Integer user id
Integer user id