Skip to content

Commit b175e3e

Browse files
committed
Serve catalog service at .../browse for all protocols
1 parent c25effc commit b175e3e

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

app/vue/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { createApp, reactive, ref } from './vue.js'
22
import cds from './cap.js'
33

4-
const { GET, POST } = cds.connect.to ('/rest/catalog')
4+
const { GET, POST } = cds.connect.to ('/rest/browse')
55
const $ = s => document.querySelector (s)
66

77
createApp ({ setup() {

srv/cat-service.cds

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using { sap.capire.bookshop as my } from '../db/schema';
22

3-
service CatalogService @(odata:'/browse') {
3+
service CatalogService @(path:'browse') {
44

55
/** For displaying lists of Books */
66
@readonly entity ListOfBooks as projection on Books {
@@ -19,5 +19,5 @@ service CatalogService @(odata:'/browse') {
1919
action submitOrder ( book: Books:ID, quantity: Integer );
2020
}
2121

22-
// Additionally serve via HCQL and REST
23-
annotate CatalogService with @hcql @rest;
22+
// Serve via OData, HCQL and REST
23+
annotate CatalogService with @odata @hcql @rest;

test/requests-hcql.http

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@cats = http://localhost:4004/hcql/catalog
1+
@cats = http://localhost:4004/hcql/browse
22
@admin = http://localhost:4004/hcql/admin
33

44

@@ -23,7 +23,7 @@ Content-Type: text/plain
2323
}
2424

2525

26-
### AdmingService.read Authors
26+
### AdminService.read Authors
2727
POST {{admin}}
2828
Authorization: Basic alice:
2929
Content-Type: text/plain

0 commit comments

Comments
 (0)