Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register User Endpoint needs id for relations instead of documentId #22205

Open
pmcroOhler opened this issue Nov 19, 2024 · 0 comments
Open

Register User Endpoint needs id for relations instead of documentId #22205

pmcroOhler opened this issue Nov 19, 2024 · 0 comments
Labels
issue: bug Issue reporting a bug severity: medium If it breaks the basic use of the product but can be worked around source: plugin:users-permissions Source is plugin/users-permissions package status: pending reproduction Waiting for free time to reproduce the issue, or more information version: 5

Comments

@pmcroOhler
Copy link

Bug report

Required System information

Node.js version: 18.20.4
NPM version: 10.7.0
Strapi version: 5.3.0
Database: sqlite
Operating system: Mac OS / homebrew
Is your project Javascript or Typescript: JS

Describe the bug

Using auth.register on Rest API we passed a documentId of a relation to connect ist while user is registered.
We get a sqLite Database Error. When we pass Id instead of documentId everything works fine.

Steps to reproduce the behavior

  1. Create Collection Type
  2. Create an Entry in collection type
  3. Create a ManyToOne Relation inside the collection type with user
  4. Register a user via REST API and try to connect the entry (POST /api/auth/local/register)
{
...
  collectionTypePluralName : [ "CollectionTypesEntryDocumentId" ],
}

Expected behavior

We expected that the documentId is needed for connecting relations on register user. Instead the Id is needed for now.

@derrickmehaffy derrickmehaffy added issue: bug Issue reporting a bug severity: medium If it breaks the basic use of the product but can be worked around source: plugin:users-permissions Source is plugin/users-permissions package status: pending reproduction Waiting for free time to reproduce the issue, or more information version: 5 labels Nov 20, 2024
@github-project-automation github-project-automation bot moved this to To be reviewed (Open) in Developer Experience Squad Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Issue reporting a bug severity: medium If it breaks the basic use of the product but can be worked around source: plugin:users-permissions Source is plugin/users-permissions package status: pending reproduction Waiting for free time to reproduce the issue, or more information version: 5
Projects
Status: To be reviewed (Open)
Status: To triage
Development

No branches or pull requests

2 participants