From 22180cb4b3f49bbd3da25d94bb2351d24daac917 Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 14 Jan 2022 12:14:06 +0200 Subject: [PATCH] fix post index receiving --- src/application/controller/api/post/add.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/application/controller/api/post/add.php b/src/application/controller/api/post/add.php index b514911..9af1dc8 100644 --- a/src/application/controller/api/post/add.php +++ b/src/application/controller/api/post/add.php @@ -11,9 +11,8 @@ if (isset($_SESSION['userName'])) { $postK = 1; if ($userPosts = $_twister->getPosts([$_SESSION['userName']], 1)) { - - if (isset($userPosts[0]['k'])) { - $postK = Filter::int($userPosts[0]['k']) + 1; + if (isset($userPosts[0]['userpost']['k'])) { + $postK = Filter::int($userPosts[0]['userpost']['k']) + 1; } }