Commit Graph
7 Commits
Author SHA1 Message Date
Sulka Haro 32163a0cd1 * Fix storage so tests pass with new Mongo driver
* Removes old openaps-storage feature
2023-06-01 22:45:07 +03:00
Ben West 41fdb8e88f respect per route body-parser configuration
This change allows each route to express policies for interpreting and parsing
the request body.  Before this change uploads to entries or treatments api
would error if they were larger than 100Kb due to the preference being set for
the whole server.  This change removes the global preference in favor of
allowing each route to choose it's own request size limit.

We also refactor usage of body-parser to be more consistent throughout the code
base.  Most routes can use jsonParser, rawPraser, and urlencodedParser provided
by the common wares component.  Anything doing something else should be called
out as such.  For example, treatments, activity, and entries allow uploads up
to 50Mb.  Other v1 endpoints are using the common configuration set to 1Mb.
2021-10-12 22:57:03 -07:00
Sulka Haro ebb58141cd Fix json decoding for some api endpoints 2021-02-09 12:52:23 +02:00
Ben West 0f735d0af5 implement read-access against token, mod default
Could see an endpoint changing the global server variable, `defaultRoles` as well.
Seems to work well to disable/enable access really quickly.
2016-08-04 15:40:02 -07:00
Jason Calabrese 3d88bd33a6 replace old wares.verifyAuthorization with ctx.authorization.isPermitted; some refactoring 2016-07-31 20:10:10 -07:00
MilosKozak 9d42964a94 fixing bugs 2015-10-28 12:00:20 +01:00
MilosKozak 51363c6ab0 extracted needed files 2015-10-28 12:00:14 +01:00