async public Task<IActionResult> FolderAddAuthorizedUser([FromBody] ghostlight.Shared.AuthorizedUser user, string folderId) { var authorizedUser = new Entities.AuthorizedUser() { Email = user.Email, FolderId = folderId }; _db.AuthorizedUsers.Add(authorizedUser); await _db.SaveChangesAsync(); return Ok(authorizedUser.ToSharedAuthorizedUser()); }
static public Shared.AuthorizedUser ToSharedAuthorizedUser(this Entities.AuthorizedUser model) { var authorizedUser = new Shared.AuthorizedUser() { Id = model.Id, Email = model.Email, Administrator = model.Administrator, Write = model.Write, Read = model.Read, Delete = model.Delete }; return(authorizedUser); }