mirror of
https://github.com/liamcottle/reticulum-meshchat.git
synced 2026-11-29 11:26:29 -05:00
move db init to web.py
This commit is contained in:
parent
0d6835fe04
commit
6960f076d3
2 changed files with 4 additions and 1 deletions
3
web.py
3
web.py
|
|
@ -14,6 +14,8 @@ from aiohttp import web, WSMessage, WSMsgType, WSCloseCode
|
|||
import asyncio
|
||||
import base64
|
||||
|
||||
from peewee import SqliteDatabase
|
||||
|
||||
import database
|
||||
|
||||
|
||||
|
|
@ -29,6 +31,7 @@ class ReticulumWebChat:
|
|||
self.load_config()
|
||||
|
||||
# init database
|
||||
database.database.initialize(SqliteDatabase('storage/reticulum-webchat.db'))
|
||||
self.db = database.database
|
||||
self.db.connect()
|
||||
self.db.create_tables([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue