mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 23:02:19 +00:00
Reference the first API key for the character
This commit is contained in:
@@ -49,7 +49,8 @@ class MiningBuddyService(BaseDBService):
|
|||||||
self.db.connection.commit()
|
self.db.connection.commit()
|
||||||
|
|
||||||
userid = self.dbcursor.lastrowid
|
userid = self.dbcursor.lastrowid
|
||||||
self.dbcursor.execute(self.SQL_ADD_API, [userid, int(time.time()), kwargs['character'].eveaccount.api_user_id, kwargs['character'].eveaccount.api_key, kwargs['character'].id])
|
api = kwargs['character'].eveaccount_set.all()[0]
|
||||||
|
self.dbcursor.execute(self.SQL_ADD_API, [userid, int(time.time()), api.api_user_id, api.api_key, kwargs['character'].id])
|
||||||
self.db.connection.commit()
|
self.db.connection.commit()
|
||||||
|
|
||||||
return { 'username': self._clean_username(username), 'password': password }
|
return { 'username': self._clean_username(username), 'password': password }
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class POSTrackerService(BaseDBService):
|
|||||||
""" Add a user """
|
""" Add a user """
|
||||||
email = kwargs['user'].email
|
email = kwargs['user'].email
|
||||||
pwhash, salt = self._gen_pwhash(password)
|
pwhash, salt = self._gen_pwhash(password)
|
||||||
eveid = kwargs['character'].eveaccount.api_user_id
|
eveid = kwargs['character'].eveaccount_set.all()[0].api_user_id
|
||||||
|
|
||||||
self.dbcursor.execute(self.SQL_ADD_USER, [eveid, username, "%s%s" % (salt, pwhash) , email])
|
self.dbcursor.execute(self.SQL_ADD_USER, [eveid, username, "%s%s" % (salt, pwhash) , email])
|
||||||
self.db.connection.commit()
|
self.db.connection.commit()
|
||||||
|
|||||||
Reference in New Issue
Block a user