using System.Web.Http;
using InventoryTraker.Web.Attributes;

namespace InventoryTraker.Web
{
	public class WebApiConfig
	{
		public static void Register(HttpConfiguration configuration)
		{
			configuration.Routes.MapHttpRoute(
				"API Default",
				"api/{controller}/{id}",
				new { id = RouteParameter.Optional });
			configuration.Filters.Add(new ExceptionHandlingAttribute());
		}
	}
}