Renamed authors ctrl to authors-public

no issue

- consistency
This commit is contained in:
kirrg001 2019-02-25 19:52:17 +01:00 committed by Katharina Irrgang
parent 7a2398b7f2
commit 46d7a5666e
8 changed files with 17 additions and 17 deletions

View File

@ -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);
},

View File

@ -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'
}
};

View File

@ -10,7 +10,7 @@ module.exports.QUERY = {
}
},
author: {
controller: 'authors',
controller: 'authorsPublic',
type: 'read',
resource: 'authors',
options: {

View File

@ -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));

View File

@ -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: {

View File

@ -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})
};

View File

@ -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: {