Skip to content
This repository was archived by the owner on Sep 27, 2021. It is now read-only.

Commit fddd713

Browse files
committed
beautify json
1 parent b0d2d29 commit fddd713

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

server.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ router.get('/user/:user/repos', async ctx => {
5353
});
5454

5555
router.get('/user/:user/json', async ctx => {
56-
ctx.body = await rclone.cat(`${pathing.encode(ctx.params.user)}.json`);
56+
ctx.set('Content-Type', 'application/json'):
57+
58+
const raw = await rclone.cat(`${pathing.encode(ctx.params.user)}.json`);
59+
60+
ctx.body = JSON.stringify(raw, null, '\t');
5761
});
5862

5963
router.get('/repos/:user/:repo', async ctx => {

0 commit comments

Comments
 (0)