aboutsummaryrefslogtreecommitdiff
path: root/API/Controllers
diff options
context:
space:
mode:
Diffstat (limited to 'API/Controllers')
-rw-r--r--API/Controllers/ErrorController.cs7
-rw-r--r--API/Controllers/UserController.cs6
2 files changed, 8 insertions, 5 deletions
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<string> GetById(int id)
+ public async Task<User> GetById(int id)
{
return await this._service.GetUserById(id);
}