feat: move title and description to revision entity

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-06-11 12:48:30 +02:00
parent 20197d36df
commit 90df9a4e32
8 changed files with 73 additions and 29 deletions

View file

@ -11,6 +11,9 @@ const handler = (req: NextApiRequest, res: NextApiResponse): void => {
respondToMatchingRequest<RevisionDetails>(HttpMethod.GET, req, res, {
id: 0,
createdAt: '2021-12-21T16:59:42.000Z',
title: 'Features',
description: 'Many features, such wow!',
tags: ['hedgedoc', 'demo', 'react'],
patch: `Index:
===================================================================
---

View file

@ -11,6 +11,9 @@ const handler = (req: NextApiRequest, res: NextApiResponse): void => {
respondToMatchingRequest<RevisionDetails>(HttpMethod.GET, req, res, {
id: 1,
createdAt: '2021-12-29T17:54:11.000Z',
title: 'Features',
description: 'Many more features, such wow!',
tags: ['hedgedoc', 'demo', 'react'],
patch: `Index:
===================================================================
---

View file

@ -14,14 +14,20 @@ const handler = (req: NextApiRequest, res: NextApiResponse): void => {
createdAt: '2021-12-29T17:54:11.000Z',
length: 2788,
authorUsernames: [],
anonymousAuthorCount: 4
anonymousAuthorCount: 4,
title: 'Features',
description: 'Many features, such wow!',
tags: ['hedgedoc', 'demo', 'react']
},
{
id: 0,
createdAt: '2021-12-21T16:59:42.000Z',
length: 2782,
authorUsernames: [],
anonymousAuthorCount: 2
anonymousAuthorCount: 2,
title: 'Features',
description: 'Many more features, such wow!',
tags: ['hedgedoc', 'demo', 'react']
}
])
}