Should this repo keep all of it's bufferization at the API boundary? #318
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:
-
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. -
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?