mirror of
https://git.wownero.com/wowlet/wowlet-backend.git
synced 2024-08-15 01:03:13 +00:00
Suchwow.xyz task
This commit is contained in:
parent
35cc00c88e
commit
4e7338a4ea
8 changed files with 165 additions and 33 deletions
|
@ -2,11 +2,13 @@
|
|||
# Copyright (c) 2020, The Monero Project.
|
||||
# Copyright (c) 2020, dsc@xmr.pm
|
||||
|
||||
import os
|
||||
import asyncio
|
||||
import json
|
||||
|
||||
from quart import websocket, jsonify
|
||||
from quart import websocket, jsonify, send_from_directory
|
||||
|
||||
import settings
|
||||
from wowlet_backend.factory import app
|
||||
from wowlet_backend.wsparse import WebsocketParse
|
||||
from wowlet_backend.utils import collect_websocket, feather_data
|
||||
|
@ -18,6 +20,13 @@ async def root():
|
|||
return jsonify(data)
|
||||
|
||||
|
||||
@app.route("/suchwow/<path:name>")
|
||||
async def suchwow(name: str):
|
||||
"""Download a SuchWow.xyz image"""
|
||||
base = os.path.join(settings.cwd, "data", "suchwow")
|
||||
return await send_from_directory(base, name)
|
||||
|
||||
|
||||
@app.websocket('/ws')
|
||||
@collect_websocket
|
||||
async def ws(queue):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue