David Mehren
8c3bf66469
Fix various ESLint errors in unit tests
...
Signed-off-by: David Mehren <git@herrmehren.de>
2021-02-27 16:11:27 +01:00
David Mehren
3fabf2596a
Merge pull request #943 from hedgedoc/refactor/getNoteContent
2021-02-23 21:05:25 +01:00
Yannick Bungers
b7e188cec2
Rename viewcount to viewCount for compliance
...
Signed-off-by: Yannick Bungers <git@innay.de>
2021-02-22 23:36:44 +01:00
Yannick Bungers
e081bd196b
Rename getNoteContentByNote to getNoteContent
...
Signed-off-by: Yannick Bungers <git@innay.de>
2021-02-22 22:34:18 +01:00
Yannick Bungers
15a1a138ee
Remove unused getNoteContentByIdOrAlias
...
Signed-off-by: Yannick Bungers <git@innay.de>
2021-02-22 22:32:00 +01:00
Philip Molares
5f49cb8d48
NotesService: Replace noteByIdOrAlias with note as parameter
...
As the NotesController has the note already, because it checked with it if the user has the permission to perform the action, it's not necessary to get the note from the DB again, instead we should just provide the note to the functions directly.
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-02-20 19:51:27 +01:00
Philip Molares
93d859647d
NotesService: Add unit tests
...
Fixed toUserDto method of UsersService: If a user has no email an empty string should be returned (like with the photoUrl) instead of null.
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-02-20 19:51:24 +01:00
Philip Molares
34087561e7
GroupsService: Create new GroupsService
...
This service is necessary as we plan to have functions to create and manipulate groups in the future.
The GroupInfoDto was moved from the file note-permissions.dto.ts to mimic the UserInfoDto.
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-02-20 16:52:18 +01:00
Yannick Bungers
f8e07f6940
Add relation between User and Group
...
This represents the users which are members of this group
Signed-off-by: Yannick Bungers <git@innay.de>
2021-02-18 22:25:52 +01:00
Philip Molares
84ec528d14
auth: Add tests for AuthService
...
Move AuthTokens to auth folder
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-01-25 21:30:02 +01:00
Tilman Vatteroth
0c56466dc1
Change year in copyright to 2021
...
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2021-01-06 22:10:19 +01:00
Philip Molares
6896daa62a
added reuse information
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-01-05 22:12:38 +01:00
David Mehren
b2085efb1d
Add missing TagRepository provider in unit tests
...
Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-24 22:21:44 +02:00
David Mehren
d7f407da2d
Switch to using the new custom logger
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-27 21:48:42 +02:00
David Mehren
2ce87f3d64
Add various missing imports and provider overrides to fix unit tests.
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-25 21:37:40 +02:00
David Mehren
5fcb220346
Add NotesService
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-08-20 19:43:08 +02:00