user: add fake_store bp

this should solve problems with 404's.
This commit is contained in:
Luna 2018-11-30 17:33:23 -03:00
parent 4d3c288750
commit df382a7a5f
3 changed files with 31 additions and 2 deletions

View File

@ -1,4 +1,5 @@
from .billing import bp as user_billing
from .settings import bp as user_settings
from .fake_store import bp as fake_store
__all__ = ['user_billing', 'user_settings']
__all__ = ['user_billing', 'user_settings', 'fake_store']

View File

@ -0,0 +1,26 @@
"""
fake routes for discord store
"""
from quart import Blueprint, jsonify
bp = Blueprint('fake_store', __name__)
@bp.route('/promotions')
async def _get_promotions():
return jsonify([])
@bp.route('/users/@me/library')
async def _get_library():
return jsonify([])
@bp.route('/users/@me/feed/settings')
async def _get_feed_settings():
return jsonify({
'subscribed_games': [],
'subscribed_users': [],
'unsubscribed_users': [],
'unsubscribed_games': [],
})

4
run.py
View File

@ -30,7 +30,7 @@ from litecord.blueprints.channel import (
)
from litecord.blueprints.user import (
user_settings, user_billing
user_settings, user_billing, fake_store
)
from litecord.blueprints.user.billing_job import (
@ -103,6 +103,8 @@ def set_blueprints(app_):
invites: None,
dms: '/users',
fake_store: None,
icons: -1,
nodeinfo: -1,
static: -1