David Mehren
283ec673cf
Remove AuthorColor entity
...
It will be replaced with the Author entity,
that will save the color
Signed-off-by: David Mehren <git@herrmehren.de>
2021-05-17 21:08:13 +02:00
Philip Molares
0f58757858
chore(test): Change test to work with publicId
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-05-16 22:46:02 +02:00
David Mehren
0a8dd454ab
NoteEntity: Allow anonymous notes
...
Notes created by anonymous users don't have an owner.
This commit updates the entity accordingly.
Signed-off-by: David Mehren <git@herrmehren.de>
2021-04-29 18:09:22 +02:00
David Mehren
22702b3390
Correctly type nullable columns
...
TypeORM columns with `nullable: true` can be `null` at runtime.
This commit ensures that the types of the corresponding properties reflect that.
Signed-off-by: David Mehren <git@herrmehren.de>
2021-04-29 16:54:57 +02:00
Philip Molares
9759d85fdd
Tests: Fix eslint errors
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-12 18:05:27 +02:00
Philip Molares
ff44a6567e
Tests: Removed all eslint-disable lines
...
As we now disable what we don't need in the eslint config, we don't need this anymore.
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-12 17:06:59 +02:00
Philip Molares
c1a9eee6a4
Config: Move config mocks in own folder
...
To clean up the config folder, all mocks are now in it's own folder.
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-01 21:12:01 +01:00
Philip Molares
54d0aa2197
NotesService: Add unit tests for forbidden note alias
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-02-20 22:23:52 +01:00
Philip Molares
966f5ee2fe
Config: Add forbiddenNoteIds to AppConfig
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-02-20 22:15:04 +01:00
David Mehren
21403ba606
Fix various ESLint errors in unit tests
...
Signed-off-by: David Mehren <git@herrmehren.de>
2021-02-24 20:20:04 +01:00
Yannick Bungers
8b75867664
Rename getNoteContentByNote to getNoteContent
...
Signed-off-by: Yannick Bungers <git@innay.de>
2021-02-22 22:34:18 +01:00
Yannick Bungers
8ec756afb4
Remove unused getNoteContentByIdOrAlias
...
Signed-off-by: Yannick Bungers <git@innay.de>
2021-02-22 22:31:02 +01:00
Yannick Bungers
8873ac316a
Rename viewcount to viewCount for compliance
...
Signed-off-by: Yannick Bungers <git@innay.de>
2021-02-22 23:36:44 +01:00
Philip Molares
4d89ffd474
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 16:50:11 +01:00
Philip Molares
bafe379cc3
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 16:09:22 +01:00
Philip Molares
b1683a5c64
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 11:41:15 +01:00
Yannick Bungers
68cbb5a9c2
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-01-27 22:58:55 +01:00
Philip Molares
508ad26771
auth: Add tests for AuthService
...
Move AuthTokens to auth folder
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-01-22 15:29:10 +01:00
Tilman Vatteroth
7aeaf488c4
Change year in copyright to 2021
...
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2021-01-06 21:36:07 +01:00
Philip Molares
dc63c76f43
added reuse information
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-01-05 22:12:38 +01:00
David Mehren
a04d5b29f9
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-03 17:24:42 +02:00
David Mehren
e37722a56a
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
b9b5af8b7f
Add various missing imports and provider overrides to fix unit tests.
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 21:59:09 +02:00
David Mehren
b05022945c
Add NotesService
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-07-26 17:28:58 +02:00