1

The way it works not is that when I call for:

client.record.getRecord('a_new_record');

it will call the server with action 'CR' (see http://deepstream.io/docs/constants.html#Actions for reference) but I only want the client to be able to read and not create a record, even if it doesn't exist.

The reason for this is that I don't want the client to be able to create unlimited records. I want to control this on the server instead.

I can split the action received if it is 'CR', then create the specific record if it doesn't exist and then the client can request the record but I don't really want to hack it this way.

So the question is: Is there a way to send only 'R' when the client tries to fetch a record, or does it have to send 'CR'?

jwanglof
  • 548
  • 1
  • 5
  • 20

1 Answers1

1

I solved this by using an RPC instead that creates a document in the database and then respond with the newly created ID. That way the client can get the new record directly by its ID.

jwanglof
  • 548
  • 1
  • 5
  • 20