🛠 Allow applications to manage the drive (#59)

* Now applications can manage the drive as they wish

* Fix typo

* Fix the access computation

* Test if my code is the issue

* Fix test if app exists

* Fix test if app exists

* Fix test if app exists
This commit is contained in:
Romaric Mourgues
2023-05-22 13:16:51 +02:00
committed by GitHub
parent 4af8e43bb2
commit 62f3b562c0
7 changed files with 124 additions and 15 deletions
@@ -44,6 +44,13 @@ const routes: FastifyPluginCallback = (fastify: FastifyInstance, _options, next)
handler: documentsController.delete.bind(documentsController),
});
fastify.route({
method: "GET",
url: `${serviceUrl}/:id/user/:user_id/access`,
preValidation: [fastify.authenticateOptional],
handler: documentsController.getAccess.bind(documentsController),
});
fastify.route({
method: "POST",
url: `${serviceUrl}/:id/version`,