mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-29 13:52:10 +03:00
Added the customThemes limits to all api versions
https://github.com/TryGhost/Team/issues/663
This commit is contained in:
parent
9010932466
commit
55a0c69451
@ -28,8 +28,13 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
permissions: true,
|
||||
query(frame) {
|
||||
async query(frame) {
|
||||
let themeName = frame.options.name;
|
||||
|
||||
if (limitService.isLimited('customThemes')) {
|
||||
await limitService.errorIfWouldGoOverLimit('customThemes', {value: themeName});
|
||||
}
|
||||
|
||||
const newSettings = [{
|
||||
key: 'active_theme',
|
||||
value: themeName
|
||||
@ -54,7 +59,8 @@ module.exports = {
|
||||
},
|
||||
async query(frame) {
|
||||
if (limitService.isLimited('customThemes')) {
|
||||
await limitService.errorIfWouldGoOverLimit('customThemes');
|
||||
// Sending a bad string to make sure it fails (empty string isn't valid)
|
||||
await limitService.errorIfWouldGoOverLimit('customThemes', {value: '.'});
|
||||
}
|
||||
|
||||
// @NOTE: consistent filename uploads
|
||||
|
@ -28,8 +28,13 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
permissions: true,
|
||||
query(frame) {
|
||||
async query(frame) {
|
||||
let themeName = frame.options.name;
|
||||
|
||||
if (limitService.isLimited('customThemes')) {
|
||||
await limitService.errorIfWouldGoOverLimit('customThemes', {value: themeName});
|
||||
}
|
||||
|
||||
const newSettings = [{
|
||||
key: 'active_theme',
|
||||
value: themeName
|
||||
@ -54,7 +59,8 @@ module.exports = {
|
||||
},
|
||||
async query(frame) {
|
||||
if (limitService.isLimited('customThemes')) {
|
||||
await limitService.errorIfWouldGoOverLimit('customThemes');
|
||||
// Sending a bad string to make sure it fails (empty string isn't valid)
|
||||
await limitService.errorIfWouldGoOverLimit('customThemes', {value: '.'});
|
||||
}
|
||||
|
||||
// @NOTE: consistent filename uploads
|
||||
|
Loading…
Reference in New Issue
Block a user