def update
      @post = Blogo::Post.where(permalink: params[:id]).first!
      service = Blogo::UpdatePostService.new(@post, post_params)

      if service.update!
        flash[:notice] = I18n.translate('blogo.admin.post_updated')
        redirect_to blogo_admin_posts_path
      else
        render 'edit'
      end
    end
def update
      @post = Blogo::Post.where(permalink: params[:id]).first!
      service = Blogo::UpdatePostService.new(@post, post_params)

      if service.update!
        flash[:notice] = I18n.translate('blogo.admin.post_updated')
        redirect_to blogo_admin_posts_path
      else
        render 'edit'
      end
    end
PATCH /admin/posts/:id