Retail_manager/RMDataManager/Controllers/UserController.cs

23 lines
533 B
C#
Raw Normal View History

using RMDataManagerLibrary.DataAcccess;
using System.Collections.Generic;
using System.Web.Http;
using RMDataManagerLibrary.Models;
using System.Web;
using Microsoft.AspNet.Identity;
namespace RMDataManager.Controllers
{
[Authorize]
public class UserController : ApiController
{
public List<UserModel> GetById()
{
string userId = RequestContext.Principal.Identity.GetUserId();
UserData data = new UserData();
return data.GetUserById(userId);
}
}
}