1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #840: Correct API path resolution for secrets when BASE_PATH is configured

This commit is contained in:
Jeremy Stretch
2017-01-23 16:25:05 -05:00
parent d36923e47d
commit 1bddd038fe
3 changed files with 9 additions and 6 deletions

View File

@@ -48,7 +48,7 @@ $(document).ready(function() {
$('#generate_keypair').click(function() {
$('#new_keypair_modal').modal('show');
$.ajax({
url: '/api/secrets/generate-keys/',
url: netbox_api_path + 'secrets/generate-keys/',
type: 'GET',
dataType: 'json',
success: function (response, status) {
@@ -75,7 +75,7 @@ $(document).ready(function() {
function unlock_secret(secret_id, private_key) {
var csrf_token = $('input[name=csrfmiddlewaretoken]').val();
$.ajax({
url: '/api/secrets/secrets/' + secret_id + '/',
url: netbox_api_path + 'secrets/secrets/' + secret_id + '/',
type: 'POST',
data: {
private_key: private_key