youtube: Fix references to twitch module

This commit is contained in:
Mattéo Delabre 2021-09-13 00:19:15 +02:00
parent efdbd0fdb2
commit ed35201a22
Signed by: matteo
GPG Key ID: AE3FBD02DC583ABB
1 changed files with 5 additions and 5 deletions

View File

@ -6,16 +6,16 @@ from .feed import construct_rss
def create_blueprint(config):
"""Create a YouTube endpoint blueprint."""
client = APIClient(config["key"])
twitch = Blueprint("youtube", __name__)
youtube = Blueprint("youtube", __name__)
@twitch.route("/<string:login>", methods=["GET", "HEAD"])
def vod(login: str):
@youtube.route("/<string:channel_id>", methods=["GET", "HEAD"])
def get(channel_id: str):
try:
return (
construct_rss(client, login),
construct_rss(client, channel_id),
{"Content-Type": "application/rss+xml"},
)
except NoSuchChannel:
abort(404)
return twitch
return youtube