diff --git a/quix-frontend/service/src/modules/web-api/folders/folders.controller.ts b/quix-frontend/service/src/modules/web-api/folders/folders.controller.ts index 6c7ed0245..86ae3ceda 100644 --- a/quix-frontend/service/src/modules/web-api/folders/folders.controller.ts +++ b/quix-frontend/service/src/modules/web-api/folders/folders.controller.ts @@ -30,6 +30,13 @@ export class FoldersController { return list; } + @Get('/user/:email/files') + async getUserFullTree(@Param('email') email: string) { + const list = await this.foldersService.getFilesForUser(email); + + return list; + } + @Get('files/:id') async getSpecificFolder(@Param('id') id: string) { const folder = this.foldersService.getFolder(id); diff --git a/quix-frontend/service/src/modules/web-api/notebooks/notebooks.controller.ts b/quix-frontend/service/src/modules/web-api/notebooks/notebooks.controller.ts index f4efa7277..db853bcf9 100644 --- a/quix-frontend/service/src/modules/web-api/notebooks/notebooks.controller.ts +++ b/quix-frontend/service/src/modules/web-api/notebooks/notebooks.controller.ts @@ -29,4 +29,18 @@ export class NotebookController { return notebook; } + + @Get(':id/:email') + @UseGuards(AuthGuard) + async getUserNotebook(@Param('email') email: string, @Param('id') id: string) { + const notebook = await this.notebookService.getNotebook(email, id); + + if (!notebook) { + throw new HttpException(`Can't find notebook`, HttpStatus.NOT_FOUND); + } + + return notebook; + } + + }