sfd
This commit is contained in:
parent
58f6753e77
commit
04d4442799
2 changed files with 4 additions and 3 deletions
|
@ -1,7 +1,6 @@
|
|||
from files.helpers.const import SITE
|
||||
|
||||
if SITE in ('pcmemes.net', 'localhost'):
|
||||
import time
|
||||
from files.helpers.wrappers import auth_required
|
||||
from files.helpers.sanitize import sanitize
|
||||
from datetime import datetime
|
||||
|
@ -15,6 +14,9 @@ if SITE in ('pcmemes.net', 'localhost'):
|
|||
online = []
|
||||
messages = []
|
||||
|
||||
if __name__ == '__main__':
|
||||
socketio.run(app)
|
||||
|
||||
@app.get("/chat")
|
||||
@auth_required
|
||||
def chat( v):
|
||||
|
@ -33,7 +35,6 @@ if SITE in ('pcmemes.net', 'localhost'):
|
|||
"username":v.username,
|
||||
"namecolor":v.namecolor,
|
||||
"text":sanitize(data),
|
||||
"time": time.strftime("%d %b %Y at %H:%M:%S", time.gmtime(int(time.time())))
|
||||
}
|
||||
|
||||
messages.append(data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue