post crud fix

This commit is contained in:
2024-07-26 12:42:44 +03:00
parent f5f546ba95
commit 2d8f945cad
7 changed files with 25 additions and 8 deletions

View File

@ -30,7 +30,7 @@ class PostController extends Controller
$postForm = new CreatePostForm();
$postService = new PostService();
$postForm->load($_REQUEST);
if((new UserService)->check($_REQUEST['user_id'])) {
if(UserService::check($_REQUEST['user_id'])) {
if ($postForm->validate()) {
$post = $postService->create($postForm);
if ($post) {