Skip to content
This repository was archived by the owner on May 28, 2023. It is now read-only.

Commit db11e15

Browse files
author
Tomasz Kostuch
authored
Merge pull request #428 from gibkigonzo/bugfix/add-output-formatter
add outputFormatter to response from cache
2 parents 8534362 + 5ec990e commit db11e15

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2323
- add es7 support for map url module and fixed default index for es config - @gibkigonzo
2424
- Add correct paths for production build - @cewald (#407)
2525
- Fix MSI default stock id value
26+
- Add outputFormatter to response from cache - @gibkigonzo (#428)
2627

2728
## [1.11.0] - 2019.12.20
2829

src/api/catalog.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export default ({config, db}) => async function (req, res, body) {
182182
res.setHeader('X-VS-Cache-Tag', tagsHeader)
183183
delete output.tags
184184
}
185-
res.json(output)
185+
res.json(_outputFormatter(output, responseFormat));
186186
console.log(`cache hit [${req.url}], cached request: ${Date.now() - s}ms`)
187187
} else {
188188
res.setHeader('X-VS-Cache', 'Miss')

src/models/order.schema.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ exports.default = {
142142
type: 'number'
143143
},
144144
save_address: {
145-
type: 'number'
145+
type: 'number'
146146
}
147147
}
148148
},
@@ -208,7 +208,7 @@ exports.default = {
208208
type: 'number'
209209
},
210210
save_address: {
211-
type: 'number'
211+
type: 'number'
212212
}
213213
}
214214
}

0 commit comments

Comments
 (0)