mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
✨ Theme Browse API endpoint (#8022)
no issue - adds `GET /themes/` endpoint for requesting all themes
This commit is contained in:
parent
348e4c2a95
commit
294561cac7
2 changed files with 6 additions and 0 deletions
|
@ -125,6 +125,8 @@ function apiRoutes() {
|
||||||
apiRouter.get('/slugs/:type/:name', authenticatePrivate, api.http(api.slugs.generate));
|
apiRouter.get('/slugs/:type/:name', authenticatePrivate, api.http(api.slugs.generate));
|
||||||
|
|
||||||
// ## Themes
|
// ## Themes
|
||||||
|
apiRouter.get('/themes/', authenticatePrivate, api.http(api.themes.browse));
|
||||||
|
|
||||||
apiRouter.get('/themes/:name/download',
|
apiRouter.get('/themes/:name/download',
|
||||||
authenticatePrivate,
|
authenticatePrivate,
|
||||||
api.http(api.themes.download)
|
api.http(api.themes.download)
|
||||||
|
|
|
@ -28,6 +28,10 @@ themes = {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
browse: function browse() {
|
||||||
|
return Promise.resolve({themes: settings.cache.get('availableThemes')});
|
||||||
|
},
|
||||||
|
|
||||||
upload: function upload(options) {
|
upload: function upload(options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue