Commit inicial: ITCA_API_SAP_WMS (.NET Core 3.1)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
2b82744eb8
168 files changed
+11066
No files matched your search
@@ -0,0 +1,37 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Net.Data;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Net.Business.Services.Controllers
|
||||
{
|
||||
[Route("api/[controller]/[action]")]
|
||||
[ApiController]
|
||||
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||
[ApiExplorerSettings(GroupName = "ApiSAPWMS")]
|
||||
[Authorize(AuthenticationSchemes = "Bearer")]
|
||||
public class ItemController : ControllerBase
|
||||
{
|
||||
private readonly IRepositoryWrapper _repository;
|
||||
public ItemController(IRepositoryWrapper repository)
|
||||
{
|
||||
this._repository = repository;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[ProducesResponseType(StatusCodes.Status201Created)]
|
||||
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<IActionResult> Stock()
|
||||
{
|
||||
var ObjectNew = await _repository.Items.GetStockItem();
|
||||
|
||||
if (ObjectNew.StatusCode != 0)
|
||||
{
|
||||
return BadRequest(ObjectNew);
|
||||
}
|
||||
return Ok(ObjectNew);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user