Skip to content

Conversation

@yaroslav8765
Copy link
Contributor

…cordId (newRecordId is deprecated)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Deprecates newRecordId in favor of redirectToRecordId for the “abort create & redirect” flow, and starts propagating the new field through hook/type definitions and the REST API.

Changes:

  • Extend hook/type return shapes to include redirectToRecordId and mark newRecordId as deprecated.
  • Add a deprecation warning when beforeSave returns newRecordId.
  • Propagate redirectToRecordId through the /create_record error response.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
adminforth/types/Back.ts Adds redirectToRecordId to relevant return types/results and deprecates newRecordId.
adminforth/modules/restApi.ts Includes redirectToRecordId in /create_record error responses.
adminforth/index.ts Adds deprecation warning + returns redirectToRecordId from createResourceRecord abort path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants