Made content import API return semantic HTTP codes

no issue
This commit is contained in:
Sam Lord 2022-11-10 16:38:30 +00:00
parent 5309660986
commit 3e13918e57

View File

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