Commit graph

6533 commits

Author SHA1 Message Date
Philip Molares
e516612a73
PrivateE2EMedia: Add E2E test for private api /media routes
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-23 22:41:57 +01:00
Philip Molares
4a44f564a7
PrivateE2E: Add test fixtures for private api
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-24 11:14:48 +01:00
Philip Molares
1835cb7499
PrivateAPI: Add media controller
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-25 21:20:56 +01:00
Philip Molares
25e310b7eb
PublicE2EMedia: Port the extra test from the private api
This ports the extra tests in the POST /media test from the private apis to the public apis E2E tests.
Also the whole test suit was renamed to 'Media'.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-24 11:24:39 +01:00
Philip Molares
6943399dcf
PrivateE2ENotes: Add E2E test for private api /notes routes
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-24 01:49:43 +01:00
Philip Molares
fe0c7b425f
PrivateAPI: Add notes controller
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-24 00:12:54 +01:00
Renovate Bot
474fd58297
Update dependency @types/jest to v26.0.22
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-03-25 19:26:39 +00:00
Philip Molares
d173ff11e5
Docs: Fix dev doc 'documentation'
Fix typos
Rewrite 'Deployment' paragraph. We currently don't and probably won't use Messor Structor.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-20 13:18:06 +01:00
Renovate Bot
be42fb426f
Update NestJS packages to v7.6.15
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-03-25 11:21:07 +00:00
Renovate Bot
b3dc9653e6
Update linters to v4.19.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-03-25 11:21:20 +00:00
Philip Molares
9874426c9a
PublicE2E: Remove uploaded files after test
This way the tests can run in any order as some of the media tests rely on an empty (or non-existing) uploads directory.
Also the me e2e test was renamed to the correct name.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-24 11:18:26 +01:00
Renovate Bot
52da6f0ea2
Lock file maintenance
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-03-24 21:58:48 +00:00
David Mehren
d7491f0ce0
Add dev docs about deleting notes & revisions
Fixes #560

Signed-off-by: David Mehren <git@herrmehren.de>
2021-03-15 11:53:44 +01:00
Philip Molares
e177d40ba5
DevDocs: Add explanations for new config modules
The new config modules `customization` and `external-services` are explained in the dev doc overview of all config modules now.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-20 13:29:39 +01:00
Philip Molares
86f5498f51
PrivateApi: Add config controller
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-01 21:16:34 +01:00
Philip Molares
9747ea209c
FrontendConfig: Add new service
This service handles the config for the frontend.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-01 21:16:01 +01:00
Philip Molares
a7c3d06216
Config: Add rendererOrigin and maxDocumentLength to AppConfig
These are used in the /config private API call.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-01 21:00:55 +01:00
Philip Molares
22081756b0
Config: Add identifier to all multi auth provider to AuthConfig
These are used in the /config private API call and needed to distinguish with which of the multiple auth providers a login should occur.
This also fixes the types of the multiple auth provider arrays to something that works, as `[{}]` specifics exactly on object in an array.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-01 21:07:43 +01:00
Philip Molares
e3f1d1b0f4
Config: Create new config mocks for tests
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-01 21:12:48 +01:00
Philip Molares
64846eb641
Config: Add two new Subconfigs
CustomizationConfig holds all possible customization configs.
ExternalConfig holds external services that may be configured.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-01 21:10:16 +01:00
Philip Molares
c6e341aab9
Config: Extend AppConfig mock
This is now more in line what you would get from the regular config code

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-02 10:49:39 +01: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
4dc18c01fb
Utils: Extract getServerVersionFromPackageJson into own file
We need this function in at least on other part of the application so extracting it into an util file was only logical.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-01 20:52:46 +01:00
Philip Molares
4aca8ada4c
NotesE2ETest: Add GET /api/v2/notes/{note}/media test
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-19 16:54:24 +01:00
Philip Molares
935d5cd548
PublicApi: Add GET /api/v2/notes/{note}/media
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-19 16:53:04 +01:00
Philip Molares
890de2dea1
MediaService: Add listUploadsByNote method
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-19 16:47:52 +01:00
Philip Molares
53f5093630
Docs: Add more documentation to the public api
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-19 12:10:46 +01:00
Philip Molares
0e44f545a1
Docs: Add description for common http codes
These are the descriptions for all 401, 403, 404 and 204 HTTP responses in HedgeDoc.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-19 12:09:50 +01:00
Philip Molares
47ca8be78b
Docs: Add ApiProperty to all Dtos
This makes it possible for the autogenerated openapi file to contain all the dtos instead of nothing.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-19 12:08:34 +01:00
Renovate Bot
3f4f5936cb
Update dependency @nestjs/swagger to v4.8.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-03-19 14:43:34 +00:00
Philip Molares
3594d904f7
PrivateE2E: Add history test
Test the /me/history route in the private API.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-04 10:20:58 +01:00
Philip Molares
29dbf0b657
PrivateAPI: Add history controller
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-03 15:25:11 +01:00
Philip Molares
b872694158
HistoryService: Add deleteHistory method
This method deletes all history entries of a user.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-03 15:23:45 +01:00
Renovate Bot
8273d8a5b9
Update dependency @types/jest to v26.0.21
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-03-17 16:05:02 +00:00
Renovate Bot
14e3035e96
Update dependency ts-jest to v26.5.4
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-03-17 13:46:03 +00:00
Renovate Bot
dc825bc200
Update dependency @types/node to v13.13.47
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-03-15 22:49:00 +00:00
Philip Molares
6e29ffba65
MediaService: Remove allowedMimeType application/pdf
Uploading PDFs does not work with imgur and therefore HedgeDoc should not offer that.

See #533

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-15 22:41:40 +01:00
Renovate Bot
96396ea237
Update linters to v4.18.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-03-15 19:22:12 +00:00
Yannick Bungers
f47d85b301
Add GET /me/media
Returns all media files uploaded by the authenticated user.

Signed-off-by: Yannick Bungers <git@innay.de>
2021-03-14 17:47:16 +01:00
Philip Molares
7a7b3d3a50
AppConfig: Fix bug in the schema of forbiddenNoteIds
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-14 17:54:50 +01:00
Renovate Bot
d09bbf661d
Lock file maintenance
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-03-15 07:54:51 +00:00
Renovate Bot
981aecaa99
Update dependency ts-loader to v8.0.18
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-03-14 17:52:33 +00:00
Renovate Bot
4942b4b922
Update dependency @azure/storage-blob to v12.5.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-03-14 17:49:35 +00:00
Renovate Bot
793ab84e0f
Update dependency @types/node to v13.13.46
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-03-14 17:46:28 +00:00
Renovate Bot
9d192567e5
Update NestJS packages
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-03-14 17:42:57 +00:00
Renovate Bot
45a0bae1e8
Update linters
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-03-14 16:21:22 +00:00
Renovate Bot
10835b53bd
Update dependency mkdocs-material to v7.0.6
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-03-14 14:36:58 +00:00
Philip Molares
50d950c5f2
PublicE2E: Add test for GET /me/history/{note} in me.e2e-spec.ts
add test for GET /me/history/{note}
add error cases to PUT /me/history/{note} and DELETE /me/history/{note}
activate missing test GET /me/notes/

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-05 12:04:06 +01:00
Philip Molares
82ef4a10cb
PublicAPI: Add /me/history/:note
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-05 12:01:43 +01:00
Philip Molares
521ddc36c6
HistoryService: Add unit test for getEntryByNoteIdOrAlias
Also add extra test to deleteHistoryEntry

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-05 12:01:04 +01:00