Пример #1
0
def ui_delete_channel(identifier):
    # Get channel info
    channel = Controller.get_channel(identifier)
    form = ChannelForm(formdata=request.form)

    if channel:
        if request.method == 'POST':
            # Delete channel
            Controller.delete_channel(identifier)
            return redirect('/ui/channels')
        return render_template('channels/delete_channel.html',
                               channel=channel['channel'],
                               separator=channel['separator'],
                               artist_before_title=channel['artist_before_title'])
Пример #2
0
 def delete(identifier):
     return {
         'message': 'Channel has been removed.',
         'data': Controller.delete_channel(identifier)
     }, 200