mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 03:44:29 +03:00
Renamed authors ctrl to authors-public
no issue - consistency
This commit is contained in:
parent
7a2398b7f2
commit
46d7a5666e
@ -103,10 +103,6 @@ module.exports = {
|
||||
return shared.pipeline(require('./slack'), localUtils);
|
||||
},
|
||||
|
||||
get authors() {
|
||||
return shared.pipeline(require('./authors'), localUtils);
|
||||
},
|
||||
|
||||
get config() {
|
||||
return shared.pipeline(require('./config'), localUtils);
|
||||
},
|
||||
@ -123,6 +119,10 @@ module.exports = {
|
||||
return shared.pipeline(require('./actions'), localUtils);
|
||||
},
|
||||
|
||||
get authorsPublic() {
|
||||
return shared.pipeline(require('./authors-public'), localUtils, 'content');
|
||||
},
|
||||
|
||||
get site() {
|
||||
return shared.pipeline(require('./site'), localUtils);
|
||||
},
|
||||
|
@ -31,7 +31,7 @@ const RESOURCES = {
|
||||
resource: 'tags'
|
||||
},
|
||||
users: {
|
||||
alias: 'authors',
|
||||
alias: 'authorsPublic',
|
||||
resource: 'users'
|
||||
},
|
||||
pages: {
|
||||
@ -39,7 +39,7 @@ const RESOURCES = {
|
||||
resource: 'posts'
|
||||
},
|
||||
authors: {
|
||||
alias: 'authors'
|
||||
alias: 'authorsPublic'
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -10,7 +10,7 @@ module.exports.QUERY = {
|
||||
}
|
||||
},
|
||||
author: {
|
||||
controller: 'authors',
|
||||
controller: 'authorsPublic',
|
||||
type: 'read',
|
||||
resource: 'authors',
|
||||
options: {
|
||||
|
@ -21,9 +21,9 @@ module.exports = function apiRoutes() {
|
||||
router.get('/pages/slug/:slug', mw.authenticatePublic, http(apiv2.pagesPublic.read));
|
||||
|
||||
// ## Users
|
||||
router.get('/authors', mw.authenticatePublic, http(apiv2.authors.browse));
|
||||
router.get('/authors/:id', mw.authenticatePublic, http(apiv2.authors.read));
|
||||
router.get('/authors/slug/:slug', mw.authenticatePublic, http(apiv2.authors.read));
|
||||
router.get('/authors', mw.authenticatePublic, http(apiv2.authorsPublic.browse));
|
||||
router.get('/authors/:id', mw.authenticatePublic, http(apiv2.authorsPublic.read));
|
||||
router.get('/authors/slug/:slug', mw.authenticatePublic, http(apiv2.authorsPublic.read));
|
||||
|
||||
// ## Tags
|
||||
router.get('/tags', mw.authenticatePublic, http(apiv2.tagsPublic.browse));
|
||||
|
@ -2982,7 +2982,7 @@ describe('Integration - Web - Site', function () {
|
||||
data: {
|
||||
query: {
|
||||
joe: {
|
||||
controller: 'authors',
|
||||
controller: 'authorsPublic',
|
||||
resource: 'authors',
|
||||
type: 'read',
|
||||
options: {
|
||||
@ -3007,7 +3007,7 @@ describe('Integration - Web - Site', function () {
|
||||
data: {
|
||||
query: {
|
||||
tag: {
|
||||
controller: 'authors',
|
||||
controller: 'authorsPublic',
|
||||
resource: 'authors',
|
||||
type: 'read',
|
||||
options: {
|
||||
|
@ -311,7 +311,7 @@ describe('{{#get}} helper', function () {
|
||||
beforeEach(function () {
|
||||
locals = {root: {_locals: {apiVersion: 'v2'}}};
|
||||
|
||||
browseUsersStub = sinon.stub(api["v2"], 'authors').get(() => {
|
||||
browseUsersStub = sinon.stub(api["v2"], 'authorsPublic').get(() => {
|
||||
return {
|
||||
browse: sinon.stub().resolves({authors: [], meta: meta})
|
||||
};
|
||||
@ -344,7 +344,7 @@ describe('{{#get}} helper', function () {
|
||||
beforeEach(function () {
|
||||
locals = {root: {_locals: {apiVersion: 'v2'}}};
|
||||
|
||||
browseUsersStub = sinon.stub(api["v2"], 'authors').get(() => {
|
||||
browseUsersStub = sinon.stub(api["v2"], 'authorsPublic').get(() => {
|
||||
return {
|
||||
browse: sinon.stub().resolves({authors: [], meta: meta})
|
||||
};
|
||||
|
@ -1202,7 +1202,7 @@ describe('UNIT: services/settings/validate', function () {
|
||||
data: {
|
||||
query: {
|
||||
author: {
|
||||
controller: 'authors',
|
||||
controller: 'authorsPublic',
|
||||
resource: 'authors',
|
||||
type: 'read',
|
||||
options: {
|
||||
@ -1267,7 +1267,7 @@ describe('UNIT: services/settings/validate', function () {
|
||||
data: {
|
||||
query: {
|
||||
author: {
|
||||
controller: 'authors',
|
||||
controller: 'authorsPublic',
|
||||
resource: 'authors',
|
||||
type: 'read',
|
||||
options: {
|
||||
@ -1433,7 +1433,7 @@ describe('UNIT: services/settings/validate', function () {
|
||||
data: {
|
||||
query: {
|
||||
people: {
|
||||
controller: 'authors',
|
||||
controller: 'authorsPublic',
|
||||
resource: 'authors',
|
||||
type: 'read',
|
||||
options: {
|
||||
|
Loading…
Reference in New Issue
Block a user