-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from ucdavis/Prototype
CMS
- Loading branch information
Showing
506 changed files
with
60,749 additions
and
50,877 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Microsoft.AspNetCore.Mvc; | ||
using Viper.Classes.SQLContext; | ||
|
||
namespace Viper.Areas.CMS.Controllers | ||
{ | ||
[Route("/CMS/[action]")] | ||
public class CMSController : Controller | ||
{ | ||
private readonly VIPERContext _viperContext; | ||
private readonly RAPSContext _rapsContext; | ||
|
||
public CMSController(RAPSContext rapsContext, VIPERContext viperContext) | ||
{ | ||
_rapsContext = rapsContext; | ||
_viperContext = viperContext; | ||
} | ||
|
||
[HttpGet] | ||
public IActionResult Files(string id = "", string fn = "", string oldURL = "", string ids = "", string fileName = "") | ||
{ | ||
Data.CMS cms = new(_viperContext, _rapsContext); | ||
|
||
if (ids.Length > 0) | ||
{ | ||
return cms.DownloadZip(this, ids.Split(','), fileName); | ||
} | ||
else | ||
{ | ||
return cms.ProvideFile(this, id, fn, oldURL); | ||
} | ||
|
||
} | ||
} | ||
} |
Oops, something went wrong.