0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Theme Browse API endpoint (#8022)

no issue
- adds `GET /themes/` endpoint for requesting all themes
This commit is contained in:
Hannah Wolfe 2017-02-21 14:59:03 +00:00 committed by Kevin Ansfield
parent 348e4c2a95
commit 294561cac7
2 changed files with 6 additions and 0 deletions

View file

@ -125,6 +125,8 @@ function apiRoutes() {
apiRouter.get('/slugs/:type/:name', authenticatePrivate, api.http(api.slugs.generate));
// ## Themes
apiRouter.get('/themes/', authenticatePrivate, api.http(api.themes.browse));
apiRouter.get('/themes/:name/download',
authenticatePrivate,
api.http(api.themes.download)

View file

@ -28,6 +28,10 @@ themes = {
});
},
browse: function browse() {
return Promise.resolve({themes: settings.cache.get('availableThemes')});
},
upload: function upload(options) {
options = options || {};