mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-08 04:28:49 +00:00
Updated RESTApi to have tokens also
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -98,6 +98,15 @@
|
||||
<a href="#" id="remove_token" class="btn red waves-effect hide">REMOVE</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="input-field col s8 m10">
|
||||
<input type="text" readonly id="new_api_token" />
|
||||
</div>
|
||||
<div class="col s2">
|
||||
<a href="#" id="get_api_token" class="btn waves-effect purple">GET API</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="thumbnails" class="col s12">
|
||||
|
||||
Reference in New Issue
Block a user