Skip to content

Querying returns buffer instead of the data #12

@laurensdc

Description

@laurensdc
// Get the patient
const patient = await Patient.findOne({
  where: { id: req.body.patientId },
  raw: true
});

returns

{ id: 1,
  encrypted: <Buffer ed 78 f4 c3 11 de c8 07 df 84 01 b2 a6 ec 23 c2 c3 20 d3 71 02 b2 0c 00 a1 d2 81 0c f1 e4 65 9d cd 4d c7 51 bf d7 d5 3b ad 2e 99 d8 39 49 44 fe 2e 15 ... >,
  photo_shortid: null,
  created_at: 2019-01-08T09:52:09.000Z,
  updated_at: 2019-01-08T09:52:09.000Z }

Rather than the unencrypted data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions