WIP reg page
This commit is contained in:
parent
14206ac477
commit
fececb327e
36 changed files with 264 additions and 211 deletions
|
|
@ -4,17 +4,20 @@ using isnd.Helpers;
|
|||
using isnd.Entities;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using isnd.Attributes;
|
||||
using System.Security.Claims;
|
||||
|
||||
namespace isnd.Controllers
|
||||
{
|
||||
public partial class PackagesController
|
||||
{
|
||||
[HttpDelete(_pkgRootPrefix + ApiConfig.Delete + "/{id}/{*lower}")]
|
||||
public async Task<IActionResult> Delete(
|
||||
[HttpDelete(_pkgRootPrefix + ApiConfig.Delete + "/{id}/{lower?}/{type?}")]
|
||||
public async Task<IActionResult> ApiDelete(
|
||||
[FromRoute][SafeName][Required] string id,
|
||||
[FromRoute][SafeName][Required] string lower)
|
||||
[FromRoute][SafeName][Required] string lower,
|
||||
[FromRoute] string type)
|
||||
{
|
||||
string pkgtype = ParamHelpers.Optional(ref lower);
|
||||
var report = await packageManager.DeletePackageAsync(id, lower, pkgtype);
|
||||
var uid = User.FindFirstValue(ClaimTypes.NameIdentifier);
|
||||
var report = await packageManager.UserAskForPackageDeletionAsync(uid, id, lower, type);
|
||||
return Ok(report);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue