mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Removed client credentials from Admin API v2 (#10485)
refs #10438 - v2 does not use client credentials anymore - exception: scheduler & backup clients
This commit is contained in:
parent
ae437a89dd
commit
90c421a8a8
2 changed files with 1 additions and 12 deletions
|
@ -1,7 +1,6 @@
|
|||
const Promise = require('bluebird');
|
||||
const {isPlainObject} = require('lodash');
|
||||
const urlService = require('../../services/url');
|
||||
const models = require('../../models');
|
||||
const config = require('../../config');
|
||||
const labs = require('../../services/labs');
|
||||
const settingsCache = require('../../services/settings/cache');
|
||||
|
@ -41,15 +40,7 @@ module.exports = {
|
|||
],
|
||||
query({data}) {
|
||||
if (!data.key) {
|
||||
return models.Client.findOne({slug: 'ghost-admin'})
|
||||
.then((ghostAdmin) => {
|
||||
const configuration = getBaseConfig();
|
||||
|
||||
configuration.clientId = ghostAdmin.get('slug');
|
||||
configuration.clientSecret = ghostAdmin.get('secret');
|
||||
|
||||
return configuration;
|
||||
});
|
||||
return Promise.resolve(getBaseConfig());
|
||||
}
|
||||
|
||||
if (data.key === 'about') {
|
||||
|
|
|
@ -37,8 +37,6 @@ describe('Configuration API', function () {
|
|||
props.blogUrl.should.eql('http://127.0.0.1:2369/');
|
||||
|
||||
props.useGravatar.should.eql(false);
|
||||
props.clientId.should.eql('ghost-admin');
|
||||
props.clientSecret.should.eql('not_available');
|
||||
|
||||
// value not available, because settings API was not called yet
|
||||
props.hasOwnProperty('blogTitle').should.eql(true);
|
||||
|
|
Loading…
Add table
Reference in a new issue