From deb2697115c8226437bee798ceee6dab207bbe3e Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 11 Mar 2023 05:49:39 -0700 Subject: [PATCH] Update ApiV1Controller, preserve album order. Fixes #3708 --- app/Http/Controllers/Api/ApiV1Controller.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index 9909d5d2d..dee9fecdb 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -2819,6 +2819,7 @@ class ApiV1Controller extends Controller if($m->profile_id !== $user->profile_id || $m->status_id) { abort(403, 'Invalid media id'); } + $m->order = $k + 1; $m->status_id = $status->id; $m->save(); array_push($mimes, $m->mime);