mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 12:21:36 +03:00
Made content import API return semantic HTTP codes
no issue
This commit is contained in:
parent
5309660986
commit
3e13918e57
@ -70,19 +70,16 @@ module.exports = {
|
||||
},
|
||||
|
||||
importContent: {
|
||||
statusCode(result) {
|
||||
if (result && (result.data || result.images)) {
|
||||
return 201;
|
||||
} else {
|
||||
return 202;
|
||||
}
|
||||
},
|
||||
headers: {
|
||||
cacheInvalidate: true
|
||||
},
|
||||
options: [
|
||||
'include'
|
||||
],
|
||||
validation: {
|
||||
options: {
|
||||
include: {
|
||||
values: exporter.BACKUP_TABLES
|
||||
}
|
||||
}
|
||||
},
|
||||
permissions: true,
|
||||
query(frame) {
|
||||
const siteTimezone = settingsCache.get('timezone');
|
||||
|
Loading…
Reference in New Issue
Block a user