mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 05:43:19 -07:00
Updated the claims so we can support more users.
Added a user management section (not yet complete) Added the api to the solution and a api key in the settings (currently only gets the requests).
This commit is contained in:
parent
741a4ae75c
commit
98eadc9cc6
12 changed files with 217 additions and 1 deletions
|
@ -42,6 +42,17 @@
|
|||
</div>
|
||||
<small class="control-label">You will have to restart after changing the url base.</small>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="ApiKey" class="control-label">Api Key</label>
|
||||
<div class="input-group">
|
||||
<input type="text" disabled="disabled" class="form-control form-control-custom" id="apiKey" name="ApiKey" value="@Model.ApiKey">
|
||||
|
||||
<div class="input-group-addon">
|
||||
<div id="refreshKey" class="fa fa-refresh" title="Reset API Key"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
|
@ -202,5 +213,27 @@ $(function() {
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#refreshKey').click(function (e) {
|
||||
e.preventDefault();
|
||||
var base = '@Html.GetBaseUrl()';
|
||||
var url = createBaseUrl(base, '/admin/createapikey');
|
||||
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: url,
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
if (response) {
|
||||
generateNotify("Success!", "success");
|
||||
$('#apiKey').val(response);
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
console.log(e);
|
||||
generateNotify("Something went wrong!", "danger");
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue