public async Task <IActionResult> AddPost(PostVM model)
        {
            if (ModelState.IsValid)
            {
                await db.AddPost(new Post
                {
                    UserId       = db.GetUserByLogin(User.Identity.Name).Id,
                    CreationTime = DateTime.Now,
                    Name         = model.Name,
                    Text         = model.Text,
                    Photo        = Helper.ConvertFileToBytes(model.Photo)
                });

                return(RedirectToAction("MyPosts", "Posts"));
            }
            return(View(model));
        }