mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Updated members-api to export a router instance
no-issue This was the original design, to make it easy to incorporate into another application, but the URL structure in Ghost did not allow for it, we've since learnt that the URL structure _should_ be how it is here, so we can export a router with both the auth endpoints and the static files for the gateway
This commit is contained in:
parent
584d725e12
commit
34f7b2c7d6
1 changed files with 8 additions and 4 deletions
|
@ -217,10 +217,14 @@ module.exports = function MembersApi({
|
|||
res.status(200).sendFile(require('path').join(__dirname, './gateway/bundle.js'));
|
||||
});
|
||||
|
||||
const apiInstance = {
|
||||
staticRouter,
|
||||
apiRouter
|
||||
};
|
||||
const apiInstance = new Router();
|
||||
|
||||
apiInstance.use(apiRouter);
|
||||
apiInstance.use('/static', staticRouter);
|
||||
|
||||
apiInstance.apiRouter = apiRouter;
|
||||
apiInstance.staticRouter = staticRouter;
|
||||
|
||||
apiInstance.members = users;
|
||||
apiInstance.getPublicKeys = getPublicKeys;
|
||||
apiInstance.getPublicConfig = function () {
|
||||
|
|
Loading…
Add table
Reference in a new issue