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();
The
get()method for the base client service does not enforce that the ID is defined.See:
feathers/packages/transport-commons/src/client.ts
Line 132 in 4c6caa2
The
update()method enforces this as you would expect.See:
feathers/packages/transport-commons/src/client.ts
Line 144 in 4c6caa2
Without enforcing that the
get()method has an ID, it just returns a random record;