mirror of
https://github.com/zadam/trilium.git
synced 2025-11-04 20:36:13 +01:00
fix a couple of api shortcomings
* add note content to openapi spec file * add test for get note content api endpoint
This commit is contained in:
25
test-etapi/get-note-content.http
Normal file
25
test-etapi/get-note-content.http
Normal file
@@ -0,0 +1,25 @@
|
||||
POST {{triliumHost}}/etapi/create-note
|
||||
Authorization: {{authToken}}
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"parentNoteId": "root",
|
||||
"title": "Hello",
|
||||
"type": "text",
|
||||
"content": "Hi there!"
|
||||
}
|
||||
|
||||
> {%
|
||||
client.global.set("createdNoteId", response.body.note.noteId);
|
||||
client.global.set("createdBranchId", response.body.branch.branchId);
|
||||
%}
|
||||
|
||||
###
|
||||
|
||||
GET {{triliumHost}}/etapi/notes/{{createdNoteId}}/content
|
||||
Authorization: {{authToken}}
|
||||
|
||||
> {%
|
||||
client.assert(response.status === 200);
|
||||
client.assert(response.body === "<p>Hi there!</p>");
|
||||
%}
|
||||
Reference in New Issue
Block a user