@app.route('/')
async def wiki_frontpage(request):
    async with aiofiles.open('data/setting.json', encoding='utf8') as f:
        setting_data = json.loads((await f.read()))
        db = (await aiosqlite.connect((setting_data['db_name'] + '.db')))
    data_get = (await db.execute('select data from wiki_set where name = ?', ['frontpage']))
    data_get = (await data_get.fetchall())
    if data_get:
        return response.redirect(('/w/' + data_get[0][0]))
    else:
        return response.redirect('/w/FrontPage')
@app.route('/')
async def wiki_frontpage(request):
    async with aiofiles.open('data/setting.json', encoding='utf8') as f:
        setting_data = json.loads((await f.read()))
        db = (await aiosqlite.connect((setting_data['db_name'] + '.db')))
    data_get = (await db.execute('select data from wiki_set where name = ?', ['frontpage']))
    data_get = (await data_get.fetchall())
    if data_get:
        return response.redirect(('/w/' + data_get[0][0]))
    else:
        return response.redirect('/w/FrontPage')