Updated RESTApi to have tokens also

This commit is contained in:
Kasper Rynning-Tønnesen
2018-03-03 16:24:57 +01:00
parent 731f26e3d4
commit 78ffcec66d
5 changed files with 375 additions and 243 deletions

View File

@@ -205,6 +205,19 @@ $(document).on("click", "#get_token", function(e){
})
});
$(document).on("click", "#get_api_token", function(e){
e.preventDefault();
$.ajax({
type: "GET",
url: "/api/api_token",
success: function(response){
if(response != false){
$("#new_api_token").val(response.token);
}
}
})
});
$(document).on("click", ".approve_thumbnails", function(e){
e.preventDefault();
var channel = $(this).attr("data-channel");