allow specifying date created in the ETAPI, #4199

This commit is contained in:
zadam
2023-08-30 00:11:32 +02:00
parent 515c5411a6
commit 041758766a
9 changed files with 396 additions and 439 deletions

View File

@@ -17,11 +17,11 @@ Content-Type: application/json
GET {{triliumHost}}/etapi/notes/{{createdNoteId}}
Authorization: {{authToken}}
> {%
> {%
client.assert(response.status === 200);
client.assert(response.body.title === 'Hello');
client.assert(response.body.type === 'code');
client.assert(response.body.mime === 'application/json');
client.assert(response.body.title === 'Hello');
client.assert(response.body.type === 'code');
client.assert(response.body.mime === 'application/json');
%}
###
@@ -33,7 +33,9 @@ Content-Type: application/json
{
"title": "Wassup",
"type": "html",
"mime": "text/html"
"mime": "text/html",
"dateCreated": "2023-08-21 23:38:51.123+0200",
"utcDateCreated": "2023-08-21 23:38:51.123Z"
}
###
@@ -41,11 +43,13 @@ Content-Type: application/json
GET {{triliumHost}}/etapi/notes/{{createdNoteId}}
Authorization: {{authToken}}
> {%
> {%
client.assert(response.status === 200);
client.assert(response.body.title === 'Wassup');
client.assert(response.body.type === 'html');
client.assert(response.body.mime === 'text/html');
client.assert(response.body.title === 'Wassup');
client.assert(response.body.type === 'html');
client.assert(response.body.mime === 'text/html');
client.assert(response.body.dateCreated == "2023-08-21 23:38:51.123+0200");
client.assert(response.body.utcDateCreated == "2023-08-21 23:38:51.123Z");
%}
###
@@ -58,8 +62,8 @@ Content-Type: application/json
"isProtected": true
}
> {%
client.assert(response.status === 400);
> {%
client.assert(response.status === 400);
client.assert(response.body.code == "PROPERTY_NOT_ALLOWED");
%}
@@ -73,7 +77,7 @@ Content-Type: application/json
"title": true
}
> {%
client.assert(response.status === 400);
> {%
client.assert(response.status === 400);
client.assert(response.body.code == "PROPERTY_VALIDATION_ERROR");
%}