UI: portal/header refinements, board index UX, and user settings
This commit is contained in:
@@ -11,7 +11,7 @@ class PostController extends Controller
|
||||
{
|
||||
public function index(Request $request): JsonResponse
|
||||
{
|
||||
$query = Post::query();
|
||||
$query = Post::query()->withoutTrashed();
|
||||
|
||||
$threadParam = $request->query('thread');
|
||||
if (is_string($threadParam)) {
|
||||
@@ -48,8 +48,10 @@ class PostController extends Controller
|
||||
return response()->json($this->serializePost($post), 201);
|
||||
}
|
||||
|
||||
public function destroy(Post $post): JsonResponse
|
||||
public function destroy(Request $request, Post $post): JsonResponse
|
||||
{
|
||||
$post->deleted_by = $request->user()?->id;
|
||||
$post->save();
|
||||
$post->delete();
|
||||
|
||||
return response()->json(null, 204);
|
||||
|
||||
Reference in New Issue
Block a user