Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ID should be required for client service get method #3618

Copy link
Copy link
@DaddyWarbucks

Description

@DaddyWarbucks
Issue body actions

The get() method for the base client service does not enforce that the ID is defined.
See:

get(id: Id, params: Params = {}) {

The update() method enforces this as you would expect.
See:

_update(id: NullableId, data: D, params: Params = {}) {

Without enforcing that the get() method has an ID, it just returns a random record;

const user = await app.service('users').get();
// user is defined because it basically did a find();
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.