Skip to content

Commit

Permalink
feat: add recycle bin plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
pyphilia committed Sep 1, 2021
1 parent c3e17e8 commit b7b9482
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 15 deletions.
38 changes: 28 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"graasp-mailer": "git://github.com/graasp/graasp-mailer.git#master",
"graasp-plugin-chatbox": "git://github.com/graasp/graasp-plugin-chatbox.git#main",
"graasp-public-items": "git://github.com/graasp/graasp-public-items.git#main",
"graasp-recycle-bin": "git://github.com/graasp/graasp-recycle-bin.git#3/prepareScript",
"graasp-s3-file-item": "git://github.com/graasp/graasp-s3-file-item.git#master",
"graasp-websockets": "git://github.com/graasp/graasp-websockets.git#master",
"jsonwebtoken": "^8.5.1",
Expand Down
17 changes: 12 additions & 5 deletions src/services/items/service-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import graaspPublicItems from 'graasp-public-items';
import graaspItemLogin from 'graasp-item-login';
import graaspApps from 'graasp-apps';
import graaspChatbox from 'graasp-plugin-chatbox';
import graaspRecycleBin from 'graasp-recycle-bin';
import fastifyCors from 'fastify-cors';

import {
Expand Down Expand Up @@ -71,14 +72,18 @@ const plugin: FastifyPluginAsync = async (fastify) => {
}

if (PUBLIC_ITEMS_PLUGIN) {
fastify.register(graaspPublicItems, {
tagId: 'afc2efc2-525e-4692-915f-9ba06a7f7887', // TODO: get from config
graaspActor: GRAASP_ACTOR,
// native fastify option
prefix: '/p'
await fastify.register(async function (fastify) {

await fastify.register(graaspPublicItems, {
tagId: 'afc2efc2-525e-4692-915f-9ba06a7f7887', // TODO: get from config
graaspActor: GRAASP_ACTOR,
// native fastify option
prefix: '/p'
});
});
}


fastify.register(async function (fastify) {
// add CORS support
if (fastify.corsPluginOptions) {
Expand Down Expand Up @@ -121,6 +126,8 @@ const plugin: FastifyPluginAsync = async (fastify) => {

fastify.register(graaspItemTags);

fastify.register(graaspRecycleBin);

if (CHATBOX_PLUGIN) {
fastify.register(graaspChatbox);
}
Expand Down

0 comments on commit b7b9482

Please sign in to comment.