Rename: WirelessCertificates -> DeviceCertificates
Code updated to reflect change from 'WirelessCertificates' to 'DeviceCertificates'
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
public partial class DeviceCertificateController : dbAdminController
|
||||
{
|
||||
|
||||
public virtual ActionResult Download(int id)
|
||||
{
|
||||
var wc = dbContext.DeviceCertificates.Find(id);
|
||||
if (wc == null)
|
||||
{
|
||||
throw new Exception("Invalid Device Certificate Id");
|
||||
}
|
||||
return File(wc.Content, "application/x-pkcs12", string.Format("{0}.pfx", wc.Name));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user