25 lines
572 B
C#
25 lines
572 B
C#
using RMDataManagerLibrary.DataAcccess;
|
|
using System.Collections.Generic;
|
|
using System.Web.Http;
|
|
using RMDataManagerLibrary.Models;
|
|
using System.Web;
|
|
using Microsoft.AspNet.Identity;
|
|
using System.Linq;
|
|
|
|
namespace RMDataManager.Controllers
|
|
{
|
|
[Authorize]
|
|
public class UserController : ApiController
|
|
{
|
|
[HttpGet]
|
|
public UserModel GetById()
|
|
{
|
|
string userId = RequestContext.Principal.Identity.GetUserId();
|
|
|
|
UserData data = new UserData();
|
|
|
|
return data.GetUserById(userId).First();
|
|
}
|
|
}
|
|
}
|