mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 10:36:54 -07:00
BaseUrl is finally finished! #72
This commit is contained in:
parent
47dc543b09
commit
67c968e886
17 changed files with 201 additions and 64 deletions
|
@ -122,11 +122,11 @@
|
|||
|
||||
$('#requestToken').click(function (e) {
|
||||
e.preventDefault();
|
||||
var url = createBaseUrl(base, "admin/requestauth");
|
||||
var url = createBaseUrl(base, "requestauth");
|
||||
var $form = $("#mainForm");
|
||||
$.ajax({
|
||||
type: $form.prop("method"),
|
||||
url: url,
|
||||
url: "requestauth",
|
||||
data: $form.serialize(),
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
|
@ -149,11 +149,11 @@
|
|||
|
||||
function loadUserList() {
|
||||
$('#users').html("");
|
||||
var url = "admin/getusers";
|
||||
var url = "getusers";
|
||||
url = createBaseUrl(base, url);
|
||||
$.ajax({
|
||||
type: "Get",
|
||||
url: url,
|
||||
url: "getusers",
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
if (response.length > 1) {
|
||||
|
|
|
@ -116,7 +116,7 @@
|
|||
<text>
|
||||
var qualitySelected = '@Model.ProfileId';
|
||||
var $form = $("#mainForm");
|
||||
var url = 'cpprofiles';
|
||||
var url = '/admin/cpprofiles';
|
||||
url = createBaseUrl(baseUrl, url);
|
||||
$.ajax({
|
||||
type: $form.prop("method"),
|
||||
|
@ -144,14 +144,17 @@
|
|||
$('#getProfiles').click(function (e) {
|
||||
e.preventDefault();
|
||||
var $form = $("#mainForm");
|
||||
var url = "admin/cpprofiles";
|
||||
url = createBaseUrl(baseUrl, url);
|
||||
var url = createBaseUrl(baseUrl, "/admin/cpprofiles");
|
||||
$.ajax({
|
||||
type: $form.prop("method"),
|
||||
data: $form.serialize(),
|
||||
url: url,
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
if (response.message) {
|
||||
generateNotify(response.message, "warning");
|
||||
return;
|
||||
}
|
||||
response.list.forEach(function (result) {
|
||||
$("#select").append("<option value='" + result._id + "'>" + result.label + "</option>");
|
||||
});
|
||||
|
@ -167,7 +170,6 @@
|
|||
e.preventDefault();
|
||||
var $form = $("#mainForm");
|
||||
var url = createBaseUrl(baseUrl,"/test/cp");
|
||||
url = createBaseUrl(baseUrl, url);
|
||||
$.ajax({
|
||||
type: $form.prop("method"),
|
||||
url: url,
|
||||
|
|
|
@ -148,13 +148,18 @@
|
|||
|
||||
$('#testSickRage').click(function (e) {
|
||||
e.preventDefault();
|
||||
var qualityProfile = $("#profiles option:selected").val();
|
||||
|
||||
var $form = $("#mainForm");
|
||||
|
||||
var data = $form.serialize();
|
||||
data = data + "&qualityProfile=" + qualityProfile;
|
||||
|
||||
var url = createBaseUrl(base, '/test/sickrage');
|
||||
$.ajax({
|
||||
type: $form.prop("method"),
|
||||
url: url,
|
||||
data: $form.serialize(),
|
||||
data: data,
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
|
|
|
@ -224,16 +224,22 @@
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
var base = '@Html.GetBaseUrl()';
|
||||
$('#testSonarr').click(function (e) {
|
||||
e.preventDefault();
|
||||
var qualityProfile = $("#profiles option:selected").val();
|
||||
|
||||
var $form = $("#mainForm");
|
||||
|
||||
var data = $form.serialize();
|
||||
data = data + "&qualityProfile=" + qualityProfile;
|
||||
|
||||
var url = createBaseUrl(base, '/test/sonarr');
|
||||
$.ajax({
|
||||
type: $form.prop("method"),
|
||||
url: url,
|
||||
data: $form.serialize(),
|
||||
data: data,
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue