qol: formatting
This commit is contained in:
@@ -121,7 +121,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
|
||||
#region Update Shortcut Methods
|
||||
|
||||
|
||||
[DiscoAuthorize(Claims.Config.DeviceBatch.Configure)]
|
||||
public virtual ActionResult UpdateName(int id, string BatchName = null, bool redirect = false)
|
||||
{
|
||||
@@ -139,7 +139,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
return Update(id, pSupplier, Supplier, redirect);
|
||||
}
|
||||
|
||||
|
||||
[DiscoAuthorize(Claims.Config.DeviceBatch.Configure), ValidateInput(false)]
|
||||
public virtual ActionResult UpdatePurchaseDetails(int id, string PurchaseDetails = null, bool redirect = false)
|
||||
{
|
||||
@@ -169,7 +169,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
return Update(id, pWarrantyValidUntil, WarrantyValidUntil, redirect);
|
||||
}
|
||||
|
||||
|
||||
[DiscoAuthorize(Claims.Config.DeviceBatch.Configure), ValidateInput(false)]
|
||||
public virtual ActionResult UpdateWarrantyDetails(int id, string WarrantyDetails = null, bool redirect = false)
|
||||
{
|
||||
@@ -193,7 +193,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
return Update(id, pInsuredUntil, InsuredUntil, redirect);
|
||||
}
|
||||
|
||||
|
||||
[DiscoAuthorize(Claims.Config.DeviceBatch.Configure), ValidateInput(false)]
|
||||
public virtual ActionResult UpdateInsuranceDetails(int id, string InsuranceDetails = null, bool redirect = false)
|
||||
{
|
||||
|
||||
@@ -1263,7 +1263,8 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
Scope = $"User Detail '{key}' didn't match any users{(string.IsNullOrWhiteSpace(value) ? null : $" with the value '{value}'")}",
|
||||
IsError = true,
|
||||
});
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var user in details.Select(d => d.User).Distinct())
|
||||
{
|
||||
@@ -1431,7 +1432,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
UiUrl = handler.GenerationOptionsUi == null ? null : Url.Action(MVC.API.DocumentTemplate.GenerateDocumentHandlerUi(template.Id, target.AttachmentReferenceId, f.Id)),
|
||||
Icon = handler.GenerationOptionsIcon,
|
||||
});
|
||||
};
|
||||
}
|
||||
return Enumerable.Empty<DocumentHandlerModel>();
|
||||
}).ToList();
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
if (id < 0)
|
||||
throw new ArgumentOutOfRangeException("id");
|
||||
|
||||
|
||||
var jobQueueJob = Database.JobQueueJobs.Include("Job").FirstOrDefault(jqj => jqj.Id == id);
|
||||
if (jobQueueJob != null)
|
||||
{
|
||||
@@ -115,7 +115,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
else
|
||||
return Json($"Error: {ex.Message}", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Update Properties
|
||||
@@ -139,7 +139,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
if (!jobQueueJob.CanEditSla())
|
||||
throw new InvalidOperationException("Editing SLA for job queue job is Denied");
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(Sla))
|
||||
{
|
||||
DateTime SLADate;
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ScheduledTaskStatus status;
|
||||
if (Plugins.PluginInstalled(packageManifest.Id))
|
||||
status = UpdatePluginTask.UpdateLocalPlugin(packageManifest.Id, tempPluginLocation, immediateRestart);
|
||||
|
||||
@@ -246,7 +246,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public virtual async Task<ActionResult> AttachmentOnlineUploadSession(string id, string domain)
|
||||
{
|
||||
var userId = ActiveDirectory.ParseDomainAccountId(id, domain);
|
||||
if (!UserService.TryGetUser(userId, Database, false,out var user))
|
||||
if (!UserService.TryGetUser(userId, Database, false, out var user))
|
||||
throw new InvalidOperationException("Unknown User");
|
||||
|
||||
try
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Disco.Web.Areas.API.Models.DocumentTemplate
|
||||
public string TemplateName { get; set; }
|
||||
public string TargetId { get; set; }
|
||||
public string TargetName { get; set; }
|
||||
|
||||
|
||||
public List<DocumentHandlerModel> Handlers { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using Disco.Services.Logging;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Disco.Services.Logging;
|
||||
|
||||
namespace Disco.Web.Areas.API.Models.Logs
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user