Skip to content

Commit 023f3fa

Browse files
committed
add endpoint to send config information
1 parent e246ddc commit 023f3fa

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/pages/api/config.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// @flow
2+
3+
import Config from '../../config';
4+
5+
export default (req, res) => {
6+
res.setHeader('access-control-allow-origin', '*');
7+
res.json({
8+
version: '1.0.0',
9+
oneGraphAppId: Config.appId,
10+
repoName: Config.repoName,
11+
repoOwner: Config.repoOwner,
12+
codeTheme: Config.codeTheme,
13+
title: Config.title,
14+
description: Config.description,
15+
});
16+
};

0 commit comments

Comments
 (0)