refactor(api/public/media): return MediaUpload object instead of url

This ensures the POST /media API behaves in the same way as /me/media

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2022-01-29 19:06:38 +01:00
parent 8e31f3a393
commit 3f8e3b0589
2 changed files with 5 additions and 5 deletions

View file

@ -58,7 +58,7 @@ describe('Media', () => {
.set('HedgeDoc-Note', 'test_upload_media')
.expect('Content-Type', /json/)
.expect(201);
const path: string = uploadResponse.body.link;
const path: string = uploadResponse.body.url;
const testImage = await fs.readFile('test/public-api/fixtures/test.png');
const downloadResponse = await request(testSetup.app.getHttpServer()).get(
path,