Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/controllers/share.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export default function (_hostName, port, options) {
}
try {
const content = await resolver(serviceOptions, id);
res.send(content);
res.set("Content-Type", "application/json").send(content);
} catch (reason) {
console.warn(JSON.stringify(reason.response, null, 2));
res
Expand Down
4 changes: 2 additions & 2 deletions spec/share-s3.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe("Share Module (e2e) - S3", () => {

await supertestReq(app)
.get("/share/s3-aqJr26G16vOvgbBGgrfzSYLIcy")
.expect(200, Buffer.from(JSON.stringify({ data: "test content" })));
.expect(200, { data: "test content" });
});

it('returns correct url in response when "newShareUrlPrefix" is empty string', async () => {
Expand Down Expand Up @@ -104,7 +104,7 @@ describe("Share Module (e2e) - S3", () => {

await supertestReq(app)
.get("/share/hBp74ADLrPU6flu0qu07Kyi1FM0")
.expect(200, Buffer.from(JSON.stringify({ data: "test content empty" })));
.expect(200, { data: "test content empty" });
});

it("should return 404 for non-existent share", async () => {
Expand Down