v0.1.4aab - Added update User backend

This commit is contained in:
Anders 2021-06-09 10:41:21 +02:00
parent 7e808b05b4
commit d0e2900941
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
<?php
require "../../bootstrap.php";
use Backend\Model\Post;
if(isset($_POST['id'])){
$post = Post::query()->find($_POST['id']);
$post->title = $_POST['upTitle'];
$post->description = $_POST['upDescription'];
if($post->update()){
return 1;
}
}