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