From 6a85255c78a448256fab68cd361983ffc85f2b03 Mon Sep 17 00:00:00 2001 From: transtrike Date: Fri, 11 Dec 2020 14:35:39 +0200 Subject: Renamed Models to Data --- API/Controllers/ErrorController.cs | 7 +++++-- API/Controllers/UserController.cs | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'API/Controllers') diff --git a/API/Controllers/ErrorController.cs b/API/Controllers/ErrorController.cs index 9af73ef..792d8cd 100644 --- a/API/Controllers/ErrorController.cs +++ b/API/Controllers/ErrorController.cs @@ -1,16 +1,19 @@ using System; using System.Net; +using System.Net.Http; using Microsoft.AspNetCore.Mvc; namespace API.Controllers { [ApiController] - [Route("/api/[controller]")] public class ErrorController { [HttpGet] - public HttpStatusCode Error(Exception exception) + [Route("HttpError")] + public HttpStatusCode HttpError(HttpRequestException exception) { + Console.WriteLine("WE HERE, BOIIIIIII"); + return HttpStatusCode.OK; } } diff --git a/API/Controllers/UserController.cs b/API/Controllers/UserController.cs index e8a58b8..3f18dbe 100644 --- a/API/Controllers/UserController.cs +++ b/API/Controllers/UserController.cs @@ -5,8 +5,8 @@ using API.Database; using API.Service; using AutoMapper; using Microsoft.AspNetCore.Mvc; -using Models.Classes; -using Models.DTOs; +using Data.Models.Classes; +using Data.Models.DTOs; namespace API.Controllers { @@ -30,7 +30,7 @@ namespace API.Controllers //Read [HttpGet] - public async Task GetById(int id) + public async Task GetById(int id) { return await this._service.GetUserById(id); } -- cgit v1.2.3