Added ability to delete channels.

This commit is contained in:
2017-09-03 04:02:28 -04:00
parent d5521074fe
commit 57b057516c
2 changed files with 13 additions and 16 deletions

View File

@ -127,7 +127,7 @@ var tbody0 = new Vue({
<th>Title</th>
<th>Description</th>
<th>ID</th>
<th>Update</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
@ -136,7 +136,10 @@ var tbody0 = new Vue({
<td class="tinytext12px">{{entry.title}}</td>
<td class="tinytext12px">{{entry.description}}</td>
<td class="tinytext12px">{{entry.channelId}}</td>
<td><i class="fa fa-refresh" aria-hidden="true" :id="entry.ytChannelID" @click="forcerefresh"/></td>
<td>
<a href="#"><i class="fa fa-refresh" aria-hidden="true" :id="entry.ytChannelID" @click="forcerefresh"/></a>
<a href="#"><i class="fa fa-trash-o" aria-hidden="true" :id="entry.ytChannelID" @click="deletechannel"/></a>
</td>
</tr>
</tbody>
</table>
@ -161,10 +164,14 @@ var tbody0 = new Vue({
});
},
forcerefresh: function (event) {
console.log("Refreshing for ID: " + event.target.id);
axios
.post('/api/Admin/job_update/' + event.target.id)
.catch(function (error) { console.log(error); });
},
deletechannel: function (event) {
axios
.delete('/api/Channels/' + event.target.id)
.catch(function (error) { console.log(error); });
}
}
});