fds
This commit is contained in:
parent
7d851c5c38
commit
0eed788e48
1 changed files with 6 additions and 8 deletions
|
@ -1,20 +1,18 @@
|
|||
import time
|
||||
from files.helpers.wrappers import *
|
||||
from files.helpers.sanitize import *
|
||||
from flask import *
|
||||
from files.__main__ import app, db_session
|
||||
from time import gmtime
|
||||
from files.helpers.wrappers import auth_required
|
||||
from files.helpers.sanitize import sanitize
|
||||
from datetime import datetime
|
||||
from flask_socketio import *
|
||||
from flask_socketio import SocketIO, emit
|
||||
|
||||
sex = SocketIO(app)
|
||||
|
||||
|
||||
@app.get("/chat")
|
||||
@auth_required
|
||||
def chat( v):
|
||||
return render_template("chat.html", v=v)
|
||||
|
||||
|
||||
|
||||
@sex.on('speak')
|
||||
@auth_required
|
||||
def speak(data, v):
|
||||
|
@ -28,7 +26,7 @@ def speak(data, v):
|
|||
"avatar": v.profile_url,
|
||||
"username":v.username,
|
||||
"text":text,
|
||||
"time": time.strftime("%d %b %Y at %H:%M:%S", time.gmtime(int(time.time()))),
|
||||
"time": time.strftime("%d %b %Y at %H:%M:%S", gmtime(int(time.time()))),
|
||||
"userlink":v.url
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue