Forgot admin imports
This commit is contained in:
parent
236b56915b
commit
8bf8e08af3
|
@ -2,7 +2,7 @@ from flask import Blueprint, render_template, request, redirect, url_for, flash
|
|||
from ..nosql import get_nosql
|
||||
from ..dlp import checkChannelId, getChannelInfo
|
||||
from ..decorators import login_required
|
||||
from ..tasks import subscribe_websub_callback, unsubscribe_websub_callback
|
||||
from ..tasks import websub_subscribe_callback, websub_unsubscribe_callback
|
||||
from datetime import datetime
|
||||
from secrets import token_urlsafe
|
||||
|
||||
|
@ -71,7 +71,7 @@ def channel(channelId):
|
|||
value = request.form.get('value', None)
|
||||
|
||||
if task == 'subscribe-websub':
|
||||
task = subscribe_websub_callback.delay(channelId)
|
||||
task = websub_subscribe_callback.delay(channelId)
|
||||
flash(f"Started task {task.id}")
|
||||
return redirect(url_for('admin.channel', channelId=channelId))
|
||||
|
||||
|
@ -114,9 +114,7 @@ def websub():
|
|||
value = request.form.get('value', None)
|
||||
|
||||
if task == 'unsubscribe':
|
||||
channelId = get_nosql().websub_getCallback(value).get('channel')
|
||||
|
||||
task = unsubscribe_websub_callback.delay(value, channelId)
|
||||
task = websub_unsubscribe_callback.delay(value)
|
||||
|
||||
flash(f"Started task {task.id}")
|
||||
return redirect(url_for('admin.websub'))
|
||||
|
|
Loading…
Reference in New Issue