Commit graph

145 commits

Author SHA1 Message Date
David Mehren
bb9e60d5f6
NoteEntity: Formatting fixes
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-19 15:57:57 +02:00
David Mehren
85fa30b27c
NoteEntity: Enable CASCADE for revision column
This makes creating new Notes easier, as the first Revision is automatically created in the database.

Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-19 15:57:34 +02:00
David Mehren
56817c3f91
NoteController: Do not use text/markdown as response content-type for createNote
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-19 15:50:58 +02:00
David Mehren
b174c0b0ab
Reverse cardinality of owner relationship
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-19 15:48:00 +02:00
David Mehren
c6787ef233
NoteDto: Rename attribute metdata to metadata
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-19 14:54:08 +02:00
David Mehren
93cf9c2c56
NotesController: Use custom logic to access raw markdown
NestJS does not support content-types other than application/json.
Therefore we need to directly access the request object to get the raw body content.

Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-19 14:51:12 +02:00
David Mehren
bbba2fc348
Add E2E tests for /notes route
Most tests already test the correct thing, but all obviously fail because nothing is implemented yet.

Signed-off-by: David Mehren <git@herrmehren.de>
2020-08-21 21:16:20 +02:00
David Mehren
f77cfce0b2
Add Jest config for E2E tests
Signed-off-by: David Mehren <git@herrmehren.de>
2020-08-21 21:13:11 +02:00
David Mehren
a59eb506e1
Do not automatically fix linting problems
Signed-off-by: David Mehren <git@herrmehren.de>
2020-08-21 21:45:53 +02:00
Nicolas Lenz
6225215c6e
Update db schema layouting
Previously, single dashes were used for associatons, which makes PlantUML layout all of them in an horizontal line. I changed that to two dashes so that PlantUML uses normal layouting. I think that is far clearer.

(See https://plantuml.com/class-diagram for more on layouting)

Signed-off-by: Nicolas Lenz <nicolas@eisfunke.com>
2020-08-29 18:37:53 +02:00
David Mehren
f007b8539c
NotesController: Add missing mock repositories for testing
Signed-off-by: David Mehren <git@herrmehren.de>
2020-08-20 19:57:56 +02:00
David Mehren
7f81a57634
MeController: Add missing mock repositories for testing
Signed-off-by: David Mehren <git@herrmehren.de>
2020-08-20 19:57:47 +02:00
Yannick Bungers
e2eac5e042
Removed unnecessary objects and flattened updateTime
Signed-off-by: Yannick Bungers <git@innay.de>
2020-08-17 23:16:08 +02:00
Yannick Bungers
fb29ab85bd
Fixed Typos, removed unnecessary type: object
and fixed copy paste errors in descriptions

Signed-off-by: Yannick Bungers <git@innay.de>
2020-08-17 23:14:38 +02:00
Yannick Bungers
ea82479050
Added GET /me/history/{note} to get data for updating history
Signed-off-by: Yannick Bungers <git@innay.de>
2020-08-17 23:09:06 +02:00
David Mehren
ee3837c7e5
Rename openapi.yml to public_api.yml 2020-07-21 20:40:49 +02:00
Yannick Bungers
f1dddb8a41
Added serverVersion to status by using SemVer
Signed-off-by: Yannick Bungers <git@innay.de>
2020-06-09 21:42:43 +02:00
Erik Michelson
b5a99b585c
Reorganized openapi.yml for external API structure
As this document should contain the details of the stable external API, it was refactored and cleaned up.

Co-Authored-By: David Mehren <dmehren1@gmail.com>
Co-Authored-By: Yannick Bungers <git@innay.de>
Co-Authored-By: Philip Molares <philip.molares@udo.edu>
2020-07-16 01:22:50 +02:00
Erik Michelson
3969ef3259
Added entries for image proxying and registering
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2020-07-10 02:29:44 +02:00
Philip Molares
7064b8c66d
server tag is now called backend
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-06-06 23:33:54 +02:00
Philip Molares
3fd0ba2c47
/me is now a put and not a post since it's an update method
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-06-06 23:33:09 +02:00
Philip Molares
5c796fb94c
fixed typo
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-06-06 23:31:05 +02:00
Philip Molares
1dd148cd0a
descriptions always end with a dot
summaries never end with a dot

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-06-06 23:26:48 +02:00
Philip Molares
a4e2596107
the api doc is now referring to the backend as such and not as system und CodiMD instance
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-06-06 22:54:02 +02:00
Philip Molares
f98fffa888
/config is now tagged as server to
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-06-06 22:51:39 +02:00
Philip Molares
10020ede69
moved the /history endpoints to /me/history
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-06-06 22:51:13 +02:00
Philip Molares
bbc6b45735
user is now always explicitly currently logged-in user
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-06-06 22:00:17 +02:00
Philip Molares
a7356ce93e
base name now is /api/v2/
this change makes sense, because v2 client should still be able to call /api/v2/ on v2.1 servers

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-06-06 21:51:57 +02:00
Philip Molares
09ee8293cd
fixed typo
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-06-06 21:46:43 +02:00
Philip Molares
dc661ad768
removed trailing / on /history/{note}
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-06-06 21:46:18 +02:00
Philip Molares
e088741578
renamed revision to revisions
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-06-06 21:45:27 +02:00
Philip Molares
1461b7ad62
removed /notes/{note}/websocket
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-06-06 21:44:15 +02:00
Philip Molares
fda6cf2e06
added export tag to /me/export
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-06-06 21:43:06 +02:00
Erik Michelson
fc8f5dbbf5
Removed tokens from API spec
With the suggested usage of an Authorization header instead of relying on session-cookies, the API will finally become stateless. Therefore we don't need the tokens for user password change and deletion anymore.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2020-06-02 00:04:24 +02:00
Erik Michelson
ab251b429e
Added missing endpoint for updating user information
Signed-off-By: Erik Michelson <github@erik.michelson.eu>
2020-05-31 02:22:00 +02:00
Erik Michelson
37b774223f
Added endpoints required for the user profile page
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2020-05-29 17:27:52 +02:00
Philip Molares
5bf64c735f
added version to /config
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-28 22:19:33 +02:00
Philip Molares
b8ccc800ad
response codes are strings now
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-28 22:19:15 +02:00
Philip Molares
83e8331b3e
added /history/{note} 2020-05-27 16:50:56 +02:00
Philip Molares
8d3a89d73f
added /config 2020-05-27 14:58:49 +02:00
Philip Molares
0522b9100e
added /history 2020-05-27 14:34:25 +02:00
Philip Molares
ea2073fa87
added /notes/{note}/websocket 2020-05-27 14:02:34 +02:00
Philip Molares
cc1e656b36
removed NewNote schema 2020-05-27 13:25:37 +02:00
Philip Molares
78b2563693
changed /note/ to /notes/
added /notes/{note}/permissions
2020-05-27 13:20:37 +02:00
Philip Molares
7649a46ff8
removed /note/{note}/info 2020-05-27 11:30:32 +02:00
Philip Molares
41f0ebcf4b
added /n/ prefix to note calls
added Note object
2020-05-25 12:04:29 +02:00
Philip Molares
4e2f7d9db5
added openapi definition for api 2.0 2020-05-24 21:00:16 +02:00
David Mehren
2654f1fa36
Implement User entity.
This commit implements the User entity according to the database schema and adds the Identity and AuthToken entities.

Signed-off-by: David Mehren <git@herrmehren.de>
2020-08-13 20:26:47 +02:00
David Mehren
6bee3b16cf
Add Session entity
This entity implements the Session interface from connect-typeorm, which we will later use to store session data from express-session.

Signed-off-by: David Mehren <git@herrmehren.de>
2020-08-13 20:25:43 +02:00
David Mehren
ef92ab73f9
Update Note entity
We now use the new permissions split in users and groups. Also the note now knows the colors of its authors.

Signed-off-by: David Mehren <git@herrmehren.de>
2020-08-13 20:24:45 +02:00