mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Made content import API return semantic HTTP codes
no issue
This commit is contained in:
parent
5309660986
commit
3e13918e57
1 changed files with 7 additions and 10 deletions
|
@ -70,19 +70,16 @@ module.exports = {
|
||||||
},
|
},
|
||||||
|
|
||||||
importContent: {
|
importContent: {
|
||||||
|
statusCode(result) {
|
||||||
|
if (result && (result.data || result.images)) {
|
||||||
|
return 201;
|
||||||
|
} else {
|
||||||
|
return 202;
|
||||||
|
}
|
||||||
|
},
|
||||||
headers: {
|
headers: {
|
||||||
cacheInvalidate: true
|
cacheInvalidate: true
|
||||||
},
|
},
|
||||||
options: [
|
|
||||||
'include'
|
|
||||||
],
|
|
||||||
validation: {
|
|
||||||
options: {
|
|
||||||
include: {
|
|
||||||
values: exporter.BACKUP_TABLES
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
permissions: true,
|
permissions: true,
|
||||||
query(frame) {
|
query(frame) {
|
||||||
const siteTimezone = settingsCache.get('timezone');
|
const siteTimezone = settingsCache.get('timezone');
|
||||||
|
|
Loading…
Add table
Reference in a new issue