fix domain ban checking and remove app data

This commit is contained in:
Izalia Mae 2020-01-17 08:47:37 -05:00
parent 18f3803856
commit a28aca218a

View file

@ -4,7 +4,7 @@ import random
from aiohttp_jinja2 import render_template as render
from urllib.parse import quote_plus, unquote_plus
from .database import pawsdb, trans, query, where, keys
from .database import pawsdb, trans, query, where, keys, ban_check
from .functions import error, fed_domain
from .oauth import create_app, login
from .config import MASTOCONFIG
@ -72,9 +72,7 @@ async def get_auth(request):
instance = fed_domain(userinfo['username'], user['domain'])
with trans(pawsdb.users) as tr:
tr.update({'handle': userinfo['username'], 'instance': instance, 'token': token}, where('handle') == numid)
print(user)
tr.update({'handle': userinfo['username'], 'instance': instance, 'token': token, 'appid': None, 'appsecret': None}, where('handle') == numid)
response = aiohttp.web.HTTPFound(redir)
response.set_cookie('paws_token', token, max_age=60*60*24*14)