diff options
author | marcinzelent <marcin@zelent.net> | 2017-05-04 00:18:38 +0200 |
---|---|---|
committer | marcinzelent <marcin@zelent.net> | 2017-05-04 00:18:38 +0200 |
commit | b4815864e99e6fdabbcf1483b4a6702b4f2c63e8 (patch) | |
tree | ed2862cbd98fc869b4033f2c49e6f502d1605d80 | |
parent | 6241ffa8ef107e42b167d50ef5d879eac2306dcf (diff) |
Revert "Added method for getting user by username."
This reverts commit 98a338082554a41c62862fcbfffabea3d9f0a9ae.
-rw-r--r-- | ApartmentManager/HousingWebAPI/Controllers/UsersController.cs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/ApartmentManager/HousingWebAPI/Controllers/UsersController.cs b/ApartmentManager/HousingWebAPI/Controllers/UsersController.cs index 098c97a..af3ac1d 100644 --- a/ApartmentManager/HousingWebAPI/Controllers/UsersController.cs +++ b/ApartmentManager/HousingWebAPI/Controllers/UsersController.cs @@ -23,18 +23,18 @@ namespace HousingWebApi.Controllers } // GET: api/Users/by-username/username - [ResponseType(typeof(User))] - [Route("api/Users/by-username/{username}")] - public IHttpActionResult GetUserByUsername(string username) - { - User user = db.Users.SingleOrDefault(u => u.Username == username); - if (user == null) - { - return NotFound(); - } - - return Ok(user); - } + //[ResponseType(typeof(User))] + //[Route("api/Users/by-username/{username:string}")] + //public IHttpActionResult GetUserByUsername(string username) + //{ + // User user = db.Users.Find(username); + // if (user == null) + // { + // return NotFound(); + // } + + // return Ok(user); + //} // GET: api/Users/5 [ResponseType(typeof(User))] |