public IActionResult Update(string id, [FromBody] OaUser oaUser) { if (oaUser == null) { return(BadRequest()); } // Not yet implemented return(new ObjectResult(new { userId = "user-id-1" })); }
public static User GetObject(Setting setting, HttpRequest request, OaUser oaUser) { var oaTenant = Oa.GetResource <OaTenant>(setting, request, oaUser.TenantLink.ApsLink.Id); var oaAdminUser = Oa.GetResource <OaAdminUser>(setting, request, oaUser.AdminUserLink.ApsLink.Id); return(new User { ApsId = oaUser.AdminUserLink.ApsLink.Id, UserId = oaUser.UserId, Email = oaAdminUser.Email, Tenant = Tenant.GetObject(setting, request, oaTenant) }); }
public IActionResult Create([FromBody] OaUser oaUser) { if (oaUser == null) { return(BadRequest()); } // Call Models var userId = Models.User.Create(_setting, Request, oaUser); return(CreatedAtRoute( "Root", null, new { userId } )); }
public static string Create(Setting setting, HttpRequest request, OaUser oaUser) { var user = GetObject(setting, request, oaUser); return(FbUser.Create(setting, user)); }