コード例 #1
0
        public IActionResult Update(string id, [FromBody] OaUser oaUser)
        {
            if (oaUser == null)
            {
                return(BadRequest());
            }

            // Not yet implemented

            return(new ObjectResult(new { userId = "user-id-1" }));
        }
コード例 #2
0
ファイル: User.cs プロジェクト: pkhodos/testapsconnector2
        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)
            });
        }
コード例 #3
0
        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 }
                       ));
        }
コード例 #4
0
ファイル: User.cs プロジェクト: pkhodos/testapsconnector2
        public static string Create(Setting setting, HttpRequest request, OaUser oaUser)
        {
            var user = GetObject(setting, request, oaUser);

            return(FbUser.Create(setting, user));
        }