#418 crud
This commit is contained in:
1 parent
e1490ef832
commit
52494ef76c
2 files changed
+80
No files matched your search
@@ -3736,6 +3736,65 @@ namespace RMuseum.Controllers
|
||||
return Ok(res.Result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// insert quoted
|
||||
/// </summary>
|
||||
/// <param name="quoted"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Route("quoted")]
|
||||
[Authorize(Policy = RMuseumSecurableItem.GanjoorEntityShortName + ":" + SecurableItem.ModifyOperationShortName)]
|
||||
[ProducesResponseType((int)HttpStatusCode.OK, Type = typeof(GanjoorQuotedPoem))]
|
||||
[ProducesResponseType((int)HttpStatusCode.BadRequest, Type = typeof(string))]
|
||||
public async Task<IActionResult> InsertGanjoorQuotedPoemAsync([FromBody] GanjoorQuotedPoem quoted)
|
||||
{
|
||||
RServiceResult<GanjoorQuotedPoem> res =
|
||||
await _ganjoorService.InsertGanjoorQuotedPoemAsync(quoted);
|
||||
if (!string.IsNullOrEmpty(res.ExceptionString))
|
||||
return BadRequest(res.ExceptionString);
|
||||
return Ok(res.Result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// update quoted
|
||||
/// </summary>
|
||||
/// <param name="quoted"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[Route("quoted")]
|
||||
[Authorize(Policy = RMuseumSecurableItem.GanjoorEntityShortName + ":" + SecurableItem.ModifyOperationShortName)]
|
||||
[ProducesResponseType((int)HttpStatusCode.OK)]
|
||||
[ProducesResponseType((int)HttpStatusCode.BadRequest, Type = typeof(string))]
|
||||
public async Task<IActionResult> UpdateGanjoorQuotedPoemsAsync([FromBody] GanjoorQuotedPoem quoted)
|
||||
{
|
||||
RServiceResult<bool> res =
|
||||
await _ganjoorService.UpdateGanjoorQuotedPoemsAsync(quoted);
|
||||
if (!string.IsNullOrEmpty(res.ExceptionString))
|
||||
return BadRequest(res.ExceptionString);
|
||||
return Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// delete quoted
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpDelete]
|
||||
[Route("quoted")]
|
||||
[Authorize(Policy = RMuseumSecurableItem.GanjoorEntityShortName + ":" + SecurableItem.ModifyOperationShortName)]
|
||||
[ProducesResponseType((int)HttpStatusCode.OK)]
|
||||
[ProducesResponseType((int)HttpStatusCode.BadRequest, Type = typeof(string))]
|
||||
public async Task<IActionResult> DeleteGanjoorQuotedPoemByIdAsync(Guid id)
|
||||
{
|
||||
RServiceResult<bool> res =
|
||||
await _ganjoorService.DeleteGanjoorQuotedPoemByIdAsync(id);
|
||||
if (!string.IsNullOrEmpty(res.ExceptionString))
|
||||
return BadRequest(res.ExceptionString);
|
||||
return Ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// readonly mode
|
||||
|
||||
@@ -2050,6 +2050,27 @@
|
||||
<param name="id"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Controllers.GanjoorController.InsertGanjoorQuotedPoemAsync(RMuseum.Models.Ganjoor.GanjoorQuotedPoem)">
|
||||
<summary>
|
||||
insert quoted
|
||||
</summary>
|
||||
<param name="quoted"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Controllers.GanjoorController.UpdateGanjoorQuotedPoemsAsync(RMuseum.Models.Ganjoor.GanjoorQuotedPoem)">
|
||||
<summary>
|
||||
update quoted
|
||||
</summary>
|
||||
<param name="quoted"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Controllers.GanjoorController.DeleteGanjoorQuotedPoemByIdAsync(System.Guid)">
|
||||
<summary>
|
||||
delete quoted
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="P:RMuseum.Controllers.GanjoorController.ReadOnlyMode">
|
||||
<summary>
|
||||
readonly mode
|
||||
|
||||
Reference in new issue
Block a user