Skip to content

Commit 8745c52

Browse files
committed
add endpoints for retrieving other user data
1 parent bff9623 commit 8745c52

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

quix-frontend/service/src/modules/web-api/folders/folders.controller.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ export class FoldersController {
3030
return list;
3131
}
3232

33+
@Get('/user/:email/files')
34+
async getUserFullTree(@Param('email') email: string) {
35+
const list = await this.foldersService.getFilesForUser(email);
36+
37+
return list;
38+
}
39+
3340
@Get('files/:id')
3441
async getSpecificFolder(@Param('id') id: string) {
3542
const folder = this.foldersService.getFolder(id);

quix-frontend/service/src/modules/web-api/notebooks/notebooks.controller.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,18 @@ export class NotebookController {
2929

3030
return notebook;
3131
}
32+
33+
@Get(':id/:email')
34+
@UseGuards(AuthGuard)
35+
async getUserNotebook(@Param('email') email: string, @Param('id') id: string) {
36+
const notebook = await this.notebookService.getNotebook(email, id);
37+
38+
if (!notebook) {
39+
throw new HttpException(`Can't find notebook`, HttpStatus.NOT_FOUND);
40+
}
41+
42+
return notebook;
43+
}
44+
45+
3246
}

0 commit comments

Comments
 (0)