update playground to match new js api
MultiPart: 4/4
Change-Id: I864ffd384b8abf60ae5514487506e71a03f61016
diff --git a/client/bundles/fortune/src/server/server.js b/client/bundles/fortune/src/server/server.js
index 91b3abb..aabcb7b 100644
--- a/client/bundles/fortune/src/server/server.js
+++ b/client/bundles/fortune/src/server/server.js
@@ -21,7 +21,7 @@
inherits(FortuneService, fortune.Fortune);
// Gets a random fortune
-FortuneService.prototype.getRandomFortune = function(ctx) {
+FortuneService.prototype.getRandomFortune = function(ctx, serverCall) {
var numExistingfortunes = this.fortunes.length;
if(numExistingfortunes === 0) {
throw new Error('Sorry! No fortune available :(');
@@ -33,7 +33,7 @@
};
// Adds a new fortune
-FortuneService.prototype.addNewFortune = function(ctx, fortune) {
+FortuneService.prototype.addNewFortune = function(ctx, serverCall, fortune) {
if(!fortune || fortune.trim() === '') {
throw new Error('Sorry! Can\'t add empty or null fortune!');
}
@@ -69,5 +69,5 @@
'Everything will now come your way.',
'Conquer your fears or they will conquer you.'
].forEach(function(fortune) {
- fortuneService.addNewFortune(null, fortune);
+ fortuneService.addNewFortune(null, null, fortune);
});
diff --git a/go/src/v.io/x/playground/testdata/src/pong/pong.js b/go/src/v.io/x/playground/testdata/src/pong/pong.js
index 9fec979..5b85bef 100644
--- a/go/src/v.io/x/playground/testdata/src/pong/pong.js
+++ b/go/src/v.io/x/playground/testdata/src/pong/pong.js
@@ -11,8 +11,9 @@
inherits(PingPongService, pingpong.PingPong);
-PingPongService.prototype.ping = function(ctx, message) {
- console.log('[' + ctx.remoteBlessingStrings + '] ' + message);
+PingPongService.prototype.ping = function(ctx, serverCall, message) {
+ var secCall = serverCall.securityCall;
+ console.log('[' + secCall.remoteBlessingStrings + '] ' + message);
return Promise.resolve('PONG');
};