fix(mgr): убрать double envelope у import/gallery#437
Open
Ibochkarev wants to merge 1 commit into
Open
Conversation
Raw getResponse() made Index nest {success,message,object} under
connector object again. Wrap via Response::fromProcessor so Vue sees
scheduled/import_id at the top level of object.
Ibochkarev
force-pushed
the
fix/issue-419-import-gallery-double-envelope
branch
from
July 24, 2026 02:17
36ed7d8 to
681ce97
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Описание
Роуты
/api/mgr/import/*и/api/mgr/utilities/gallery/updateотдавали сыройmodProcessorResponse::getResponse()({success,message,object}).Processors\Api\Indexкладёт в connectorobjectзначение$responseData['data'] ?? $responseData, ключаdataнет — получаетсяobject.object.scheduledвместоobject.scheduled.Маршруты переведены на
Response::fromProcessor()(тот же паттерн, что login/register вweb.php): success →data= processor object; error → message + HTTP 400, payload object вerrors.Тип изменений
Связанные Issues
Closes #419
Как это было протестировано?
Vue не трогали:
request.jsуже возвращает connectorobject; после фикса там снова лежатscheduled/import_id/ gallery counters.composer ci:php,npm run lint:ci/ GitHub Actions CI)Конфигурация тестирования:
fix/issue-419-import-gallery-double-envelopeСкриншоты (если применимо)
Чеклист
npm run lint:ciдля Vue) — Vue не менялиДополнительные заметки
Response::fromProcessor(с разбором HTTPcodeдля auth). Здесь helper простой, как вweb.php. При merge оставить один метод; auth-статусы — зона fix(api): HTTP 401/429 для auth и rate-limit в Web API #434.addFieldError) в MODX живут отдельно отgetObject(); в этот PR не тащили полныйgetResponse()-parse.