Skip to content

Commit

Permalink
Merge branch 'main' into int.js-revisited
Browse files Browse the repository at this point in the history
  • Loading branch information
danjoa authored Jul 5, 2023
2 parents 20697cf + 96473d4 commit 5ebd77a
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
node-version: [18.x, 16.x, 14.x]
node-version: [18.x, 16.x]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion data-viewer/app/viewer/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* global Vue axios */ //> from vue.html
const GET = (url) => axios.get('/-data'+url)
const GET = (url) => axios.get('/odata/v4/-data'+url)
const storageGet = (key, def) => localStorage.getItem('data-viewer:'+key) || def
const storageSet = (key, val) => localStorage.setItem('data-viewer:'+key, val)
const columnKeysFirst = (c1, c2) => {
Expand Down
2 changes: 1 addition & 1 deletion fiori/app/genres/webapp/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"resources": "resources.json",
"dataSources": {
"main": {
"uri": "/v2/browse",
"uri": "/odata/v2/browse",
"type": "OData",
"settings": {
"annotations": ["localAnnotations"],
Expand Down
2 changes: 1 addition & 1 deletion fiori/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ const cds = require("@sap/cds")
const proxy = require('@cap-js-community/odata-v2-adapter')
const opts = global.it ? { target:'auto' } : {} // for tests, set 'auto' to detect port dynamically
cds.on('bootstrap', app => app.use(proxy(opts))) // install proxy
cds.log('cov2ap','silent') // suppress anoying log outpout, e.g. for `npm run mocha -- --reporter nyan`
// cds.log('cov2ap','silent') // suppress anoying log outpout, e.g. for `npm run mocha -- --reporter nyan`

module.exports = require('@capire/bookstore/server.js')
2 changes: 1 addition & 1 deletion orders/app/orders/webapp/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"i18n": "i18n/i18n.properties",
"dataSources": {
"OrdersService": {
"uri": "/orders/",
"uri": "/odata/v4/orders/",
"type": "OData",
"settings": {
"odataVersion": "4.0"
Expand Down
93 changes: 47 additions & 46 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions test/fiori.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('cap/samples - Fiori APIs - v2', function() {
// if (this.timeout) this.timeout(1e6)

it('serves $metadata documents in v2', async () => {
const { headers, data } = await GET `/v2/browse/$metadata`
const { headers, data } = await GET `/odata/v2/browse/$metadata`
expect(headers).to.contain({
'content-type': 'application/xml',
'dataserviceversion': '2.0',
Expand All @@ -17,7 +17,7 @@ describe('cap/samples - Fiori APIs - v2', function() {
})

it('serves Books in v2', async () => {
const { data } = await GET `/v2/browse/Books`
const { data } = await GET `/odata/v2/browse/Books`
expect(data).to.containSubset({d:{results:[]}})
expect(data.d.results.length).to.be.greaterThanOrEqual(5)
})
Expand Down

0 comments on commit 5ebd77a

Please sign in to comment.