Skip to content

Ambiguous documentation about deleting in new axios plugin #1696

@vesper8

Description

@vesper8

Environment

No response

Reproduction


Describe the bug

In these docs: https://pinia-orm.codedredd.de/plugins/axios/guide/usage#delete-requests

You have this code snippet

useAxiosRepo(User).api().delete('/api/users/1', {
  delete: 1
})

It's unclear whether the value required by the delete parameter must be the id of the User you want to delete, or whether the 1 is actually a boolean true. Since in the example above both the api endpoint and the value below are both 1

I tried deleting something without adding the delete parameter and I got an error about a missing primary key.

I then added the id I wanted deleted, and this time I got no error, but it also did not delete the record I wanted to delete.

Finally I changed it to 1 (Even though the record I want to delete is not 1, and then inside the .then statement I used useRepo to delete the record myself.

This is working well but.. unsure if this is the way.. seems something is not working here.

Furthermore, the documentation says to refer to See also: [Configurations - delete](https://pinia-orm.codedredd.de/plugins/axios/guide/configurations#delete) for more info, but this link (https://pinia-orm.codedredd.de/plugins/axios/guide/configurations#delete) leads to a 404

Additional context

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions