Пример #1
0
        public Response <Profile> Post([FromBody] Profile value)
        {
            var service = new Services.Users.ProfileService(Context, CurrentUser);

            service.SaveProfile(value);

            LogService.Write("Saved profile", String.Format("User:{0}", value.UserId));

            return(new Response <Profile>(value));
        }
Пример #2
0
        public Response <UserVM> Post([FromBody] UserVM value)
        {
            var userService = new Services.Users.UserService(Context, CurrentUser);

            userService.SaveUser(value);

            var profService = new Services.Users.ProfileService(Context, CurrentUser);

            profService.SaveProfile(value.Profile);

            var langService = new Services.Localization.UserLanguageService(Context, CurrentUser);

            langService.SaveUserLanguages(value.UserId, value.Languages);

            LogService.Write("Saved profile", value.UserId.ToString());
            return(new Response <UserVM>(value));
        }