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:
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));
|
||||
|
||||
// ## Themes
|
||||
apiRouter.get('/themes/', authenticatePrivate, api.http(api.themes.browse));
|
||||
|
||||
apiRouter.get('/themes/:name/download',
|
||||
authenticatePrivate,
|
||||
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) {
|
||||
options = options || {};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue