Updated server/server.py
This commit is contained in:
parent
e96235b177
commit
6de9c9cf3a
|
|
@ -1,16 +1,15 @@
|
||||||
|
import rsa
|
||||||
|
from server.models import Message
|
||||||
|
from cryptography.fernet import Fernet
|
||||||
from sanic.response import HTTPResponse
|
from sanic.response import HTTPResponse
|
||||||
from sanic import Sanic, Request, response
|
from sanic import Sanic, Request, response
|
||||||
from cryptography.fernet import Fernet
|
|
||||||
|
|
||||||
|
|
||||||
import rsa
|
|
||||||
|
|
||||||
app = Sanic("app")
|
app = Sanic("app")
|
||||||
app.config.OAS = False
|
app.config.OAS = False
|
||||||
|
|
||||||
# Message structure is:
|
# Message structure is:
|
||||||
# [username: message, ...]
|
# [username: message, ...]
|
||||||
actual_messages: list[str] = []
|
actual_messages: list[Message] = []
|
||||||
# Users structure is
|
# Users structure is
|
||||||
# {Ip, Username: Public key}
|
# {Ip, Username: Public key}
|
||||||
users: dict[str, str] = {}
|
users: dict[str, str] = {}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user