]> git.mxchange.org Git - friendica.git/commitdiff
Update src/Module/BaseApi.php
authorHank G <hankgrabowski@gmail.com>
Tue, 28 Feb 2023 18:49:23 +0000 (13:49 -0500)
committerGitHub <noreply@github.com>
Tue, 28 Feb 2023 18:49:23 +0000 (13:49 -0500)
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
src/Module/BaseApi.php

index 2be5c246a2aee5e8be305f652a8d57791b935677..10e64044f31a987141d04b188d9d6168900262b8 100644 (file)
@@ -170,19 +170,11 @@ class BaseApi extends BaseModule
                $requested_order = $request['friendica_order'];
                switch ($requested_order) {
                        case TimelineOrderByTypes::CHANGED:
-                               $order_field = 'changed';
-                               break;
                        case TimelineOrderByTypes::CREATED:
-                               $order_field = 'created';
-                               break;
                        case TimelineOrderByTypes::COMMENTED:
-                               $order_field = 'commented';
-                               break;
                        case TimelineOrderByTypes::EDITED:
-                               $order_field = 'edited';
-                               break;
                        case TimelineOrderByTypes::RECEIVED:
-                               $order_field = 'received';
+                               $order_field = $requested_order;
                                break;
                        case TimelineOrderByTypes::ID:
                        default: