Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Should this repo keep all of it's bufferization at the API boundary? #318

Closed
@philbooth

Description

In #315, some changes were made to hex-encode the email param on a bunch of endpoints. From a functional standpoint I have no problem with them, it's all good stuff.

But from a code-cleanliness standpoint it seems like the bufferization got moved to the wrong place.

Two reasons:

  1. For other params, we do the bufferization as close to the API boundary as possible, in db-server/index.js. Semantically, that feels like the right place for argument-marshalling to happen, and these changes break with the convention.

  2. By doing the bufferization closer to the db layer, we have to implement it twice on each endpoint. Once in the memory backend and again in the MySQL backend. Better to only do it once at the API boundary, no?

Should we move the bufferization so it happens in db-server/index.js again?

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions