feat(module,app): basic module to list apps
This commit is contained in:
@ -11,6 +11,10 @@ function onInit() {
|
||||
rpc.register("reset", reset);
|
||||
rpc.register("total", total);
|
||||
rpc.register("getUserInfo", getUserInfo);
|
||||
|
||||
rpc.register("listApps");
|
||||
rpc.register("getApp");
|
||||
rpc.register("getAppUrl");
|
||||
}
|
||||
|
||||
// Called for each client message
|
||||
@ -79,4 +83,18 @@ function getUserInfo(ctx, params) {
|
||||
role: role,
|
||||
preferredUsername: preferredUsername,
|
||||
};
|
||||
}
|
||||
|
||||
function listApps(ctx) {
|
||||
return app.list(ctx);
|
||||
}
|
||||
|
||||
function getApp(ctx, params) {
|
||||
var appId = params.appId;
|
||||
return app.get(ctx, appId);
|
||||
}
|
||||
|
||||
function getAppUrl(ctx, params) {
|
||||
var appId = params.appId;
|
||||
return app.getUrl(ctx, appId);
|
||||
}
|
Reference in New Issue
Block a user