Добавил роуты до контроллер? чтобы получить доступы через постман

parent 5befd221
......@@ -5,6 +5,7 @@ using Payment.WebApi.Repositories.Interfaces;
namespace Payment.WebApi.Controllers;
[ApiController]
[Route("Suppliers/[action]")]
public class SupplierController : Controller
{
private readonly ISupplierRepository _supplierRepository;
......@@ -14,6 +15,8 @@ public class SupplierController : Controller
_supplierRepository = supplierRepository;
}
[HttpGet]
[ActionName("GetAll")]
public ActionResult<List<Supplier>> GetAll()
{
try
......
......@@ -5,6 +5,7 @@ using Payment.WebApi.Repositories.Interfaces;
namespace Payment.WebApi.Controllers;
[ApiController]
[Route("Users/[action]")]
public class UserController : Controller
{
private readonly IUserRepository _userRepository;
......@@ -14,6 +15,8 @@ public class UserController : Controller
_userRepository = userRepository;
}
[HttpGet]
[ActionName("GetUser")]
public ActionResult<User> GetUser(int id)
{
try
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment