-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ivan Porta
committed
May 1, 2018
1 parent
9e338a8
commit 376af6f
Showing
57 changed files
with
2,235 additions
and
1,535 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Origin.Models; | ||
using Origin.Service.Implementation; | ||
using Origin.ViewModels.Requests; | ||
|
||
namespace Origin.Controllers | ||
{ | ||
[Authorize] | ||
public class ItemTypeController : Controller | ||
{ | ||
private readonly OriginDbContext _context; | ||
|
||
private readonly ItemTypeService _service; | ||
|
||
public ItemTypeController(OriginDbContext context) | ||
{ | ||
_context = context; | ||
_service = new ItemTypeService(context); | ||
} | ||
|
||
//[HttpPost] | ||
//public JsonResult AddItem(AddItemRequest request) | ||
//{ | ||
// var viewModel = service.AddItem(request); | ||
// return Json(viewModel, JsonRequestBehavior.DenyGet); | ||
//} | ||
|
||
//[HttpPost] | ||
//public JsonResult GetItem(GetItemRequest request) | ||
//{ | ||
// var viewModel = service.GetItem(request); | ||
// return Json(viewModel, JsonRequestBehavior.DenyGet); | ||
//} | ||
|
||
[HttpPost] | ||
public JsonResult GetItemTypes(GetItemTypesRequest request) | ||
{ | ||
var viewModel = _service.GetItemTypesToList(request); | ||
return Json(viewModel); | ||
} | ||
|
||
//[HttpPost] | ||
//public JsonResult DeleteItem(DeleteItemRequest request) | ||
//{ | ||
// var viewModel = service.DeleteItems(request); | ||
// return Json(viewModel, JsonRequestBehavior.DenyGet); | ||
//} | ||
} | ||
} |
Oops, something went wrong.