feat(Controller): Nicht erforderliche Post-, Put- und Delete-Methoden ignorieren
This commit is contained in:
parent
a78c117a47
commit
a954a24888
@ -17,4 +17,22 @@ public class ConfigController : CRUDControllerBaseWithErrorHandling<IConfigServi
|
|||||||
public ConfigController(ILogger<ConfigController> logger, IConfigService service) : base(logger, service)
|
public ConfigController(ILogger<ConfigController> logger, IConfigService service) : base(logger, service)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[NonAction]
|
||||||
|
public override Task<IActionResult> Create(ConfigCreateDto createDto)
|
||||||
|
{
|
||||||
|
return base.Create(createDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
[NonAction]
|
||||||
|
public override Task<IActionResult> Update(ConfigUpdateDto updateDto)
|
||||||
|
{
|
||||||
|
return base.Update(updateDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
[NonAction]
|
||||||
|
public override Task<IActionResult> Delete([FromRoute] int id)
|
||||||
|
{
|
||||||
|
return base.Delete(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -65,6 +65,7 @@ public class ProfileControlsTFController : CRUDControllerBase<IProfileControlsTF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[NonAction]
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public override async Task<IActionResult> Create([FromBody] ProfileControlsTFCreateDto createDto)
|
public override async Task<IActionResult> Create([FromBody] ProfileControlsTFCreateDto createDto)
|
||||||
{
|
{
|
||||||
@ -93,6 +94,7 @@ public class ProfileControlsTFController : CRUDControllerBase<IProfileControlsTF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[NonAction]
|
||||||
[HttpDelete]
|
[HttpDelete]
|
||||||
public override async Task<IActionResult> Delete([FromRoute] int id)
|
public override async Task<IActionResult> Delete([FromRoute] int id)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -49,7 +49,7 @@ namespace WorkFlow.API.Controllers
|
|||||||
return await _service.ReadAsync(
|
return await _service.ReadAsync(
|
||||||
withProfile: withProfile, withUser: withUser, withState,
|
withProfile: withProfile, withUser: withUser, withState,
|
||||||
userId: id,
|
userId: id,
|
||||||
profileId: profileId, objId: objId, profileActive: profileActive)
|
profileId: profileId, objId: objId)
|
||||||
.ThenAsync(
|
.ThenAsync(
|
||||||
Success: pctf => pctf.Any() ? Ok(pctf) : NotFound(),
|
Success: pctf => pctf.Any() ? Ok(pctf) : NotFound(),
|
||||||
Fail: IActionResult (msg, ntc) =>
|
Fail: IActionResult (msg, ntc) =>
|
||||||
|
|||||||
@ -17,4 +17,22 @@ public class StateController : CRUDControllerBaseWithErrorHandling<IStateService
|
|||||||
public StateController(ILogger<StateController> logger, IStateService service) : base(logger, service)
|
public StateController(ILogger<StateController> logger, IStateService service) : base(logger, service)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[NonAction]
|
||||||
|
public override Task<IActionResult> Create(StateCreateDto createDto)
|
||||||
|
{
|
||||||
|
return base.Create(createDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
[NonAction]
|
||||||
|
public override Task<IActionResult> Update(StateUpdateDto updateDto)
|
||||||
|
{
|
||||||
|
return base.Update(updateDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
[NonAction]
|
||||||
|
public override Task<IActionResult> Delete([FromRoute] int id)
|
||||||
|
{
|
||||||
|
return base.Delete(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user