From 7827ef477aace633db7a0c14ecdeb27614921789 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Thu, 4 Aug 2016 00:06:59 +0200 Subject: [PATCH] authorizations and routes --- Yavsc/ApiControllers/BookQueryApiController.cs | 3 ++- Yavsc/ApiControllers/EstimateApiController.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Yavsc/ApiControllers/BookQueryApiController.cs b/Yavsc/ApiControllers/BookQueryApiController.cs index dae6278c..de9cae3d 100644 --- a/Yavsc/ApiControllers/BookQueryApiController.cs +++ b/Yavsc/ApiControllers/BookQueryApiController.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Linq; +using Microsoft.AspNet.Authorization; using Microsoft.AspNet.Http; using Microsoft.AspNet.Mvc; using Microsoft.Data.Entity; @@ -9,7 +10,7 @@ using Yavsc.Models.Booking; namespace Yavsc.Controllers { [Produces("application/json")] - [Route("api/BookQueryApi")] + [Route("api/bookquery"),Authorize(Roles="Performer,Administrator")] public class BookQueryApiController : Controller { private ApplicationDbContext _context; diff --git a/Yavsc/ApiControllers/EstimateApiController.cs b/Yavsc/ApiControllers/EstimateApiController.cs index 2ed74d47..e32c08e4 100644 --- a/Yavsc/ApiControllers/EstimateApiController.cs +++ b/Yavsc/ApiControllers/EstimateApiController.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Linq; +using Microsoft.AspNet.Authorization; using Microsoft.AspNet.Http; using Microsoft.AspNet.Mvc; using Microsoft.Data.Entity; @@ -9,7 +10,7 @@ using Yavsc.Models.Billing; namespace Yavsc.Controllers { [Produces("application/json")] - [Route("api/Estimate")] + [Route("api/do"),Authorize(Roles="Performer,Administrator")] public class EstimateApiController : Controller { private ApplicationDbContext _context;