bluehalo / node-fhir-server-core

An Open Source secure REST implementation for the HL7 FHIR Specification. For API documentation, please see https://github.com/Asymmetrik/node-fhir-server-core/wiki.
https://asymmetrik.com/healthcare
MIT License
391 stars 120 forks source link

Bug: Create method won't return values #222

Closed aaburgos4 closed 4 years ago

aaburgos4 commented 4 years ago

I am creating a resource and trying to return the ID from my database once it's created. The (docs) mention that it should be able to return the id and the resource_version, but instead I receive an empty response.

exports.create = async (params, { req }) => {
  return {
    id: 'test',
    resource_version: '1'
  };
};
aaburgos4 commented 4 years ago

Closing after seeing in the source code that this returns a 201.

ZuSe commented 4 years ago

@aaburgos4

Why is 201 for u ok? I think returning the created object or at least the id would be more RESTlike and help client developers a lot.