Retail_manager/RMDataManager/Controllers/UserController.cs
s459315 aa98988db1 Added RMDataManageLibrary project
Added a way to communicate with database
2022-07-14 19:41:50 +02:00

23 lines
533 B
C#

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);
}
}
}