Commit graph

20 commits

Author SHA1 Message Date
yamashu
8b6bedab39
refactor(test): Replace inline snapshot with file snapshot (#5830) 2024-10-08 21:13:27 +00:00
Erik Michelson
b44f395852 fix(tests): fix tests and linting
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-09-26 18:39:37 +02:00
yamashu
4fce422bdb
feat(backend revision): add clean-up note revisions job (#5349) 2024-09-26 17:24:24 +02:00
Erik Michelson
2c6717e1ee refactor(api-token): drop passport, rename to ApiToken
We don't need a library that requires as much boilerplate code as
writing the AuthGuard ourselves, especially since the token validation
was already custom code by us.

The previous name PublicAuthToken was a bit misleading, since PublicAuth
 could also be interpreted as being used for the public frontend in
contrast to the API. The old name before that (AuthToken) wasn't better
since it wasn't clear what type of auth is meant. I know, this is the
second renaming of the same module in less than a month. However, I
would say the name ApiToken seems rather reasonable and understandable.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-09-18 19:14:32 +02:00
Erik Michelson
73d9c3231b refactor(backend): rename auth to public-auth-token
Signed-off-by: Yannick Bungers <git@innay.de>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-09-02 10:33:08 +02:00
Erik Michelson
0c4e9bc080
fix(formatting): remove blank line to silence prettier
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-08-29 00:00:08 +02:00
yamashush
e99ba0615c test: fix update patch when removing old revisions
Signed-off-by: yamashush <38120991+yamashush@users.noreply.github.com>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2024-08-23 18:43:40 +02:00
Tilman Vatteroth
4d70ccafbc fix: code formatting
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-07-16 10:51:51 +02:00
David Mehren
a5d8c9cc33 refactor(backend): fix nestjs-typed linting errors
Signed-off-by: David Mehren <git@herrmehren.de>
2023-07-09 21:12:56 +02:00
Yannick Bungers
f362d27d3f Move session entity to sessions folder
Signed-off-by: Yannick Bungers <git@innay.de>
2023-07-06 12:07:44 +02:00
Tilman Vatteroth
cf02c35b49 fix: save created revision on realtime note destroy
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-06-21 14:17:25 +02:00
Tilman Vatteroth
c25c0fac92 fix: don't save revisions on creation
sometimes we create revisions for notes that don't exist yet. If we try to persist a revision that is referring to a non-existing note the whole attempt crashes.

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-06-20 11:44:38 +02:00
Tilman Vatteroth
bb355feddc fix: improve and adjust tests
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-06-20 11:44:38 +02:00
Tilman Vatteroth
e84096b5dc feat: generate metadata from content on revision creation
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-06-20 11:44:38 +02:00
Tilman Vatteroth
90df9a4e32 feat: move title and description to revision entity
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-06-20 11:44:38 +02:00
David Mehren
382e70bf7b fix: replace Equals constructor
TypeORMs Equals constructor is still broken, so this commit removes all remaining usages.

See https://github.com/hedgedoc/hedgedoc/issues/2467

Signed-off-by: David Mehren <git@herrmehren.de>
2023-03-25 12:43:27 +01:00
Tilman Vatteroth
a826677225 refactor: save ydoc state in the database, so it can be restored easier
By storing the ydoc state in the database we can reconnect lost clients easier
and enable offline editing because we continue using the crdt data that has been
used by the client before the connection loss.

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-24 16:03:55 +01:00
Philip Molares
d3249c6635 test: fix "creates a new revision" test
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-11-27 21:29:23 +01:00
Philip Molares
231a3fd6bd feat: add note specific filename for unidiff format in revision patch
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-11-27 21:29:23 +01:00
Tilman Vatteroth
bf30cbcf48 fix(repository): Move backend code into subdirectory
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2022-10-30 22:46:42 +01:00