Skip to content

casActionRun

Deva Kumar edited this page Jan 20, 2020 · 1 revision

casActionRun ⇒ promise

Calls cas server and returns the results(async)

Returns: promise -

returns results from cas

Param Type Description
store object

restaf store

session object

cas session

parameters object

parameters for the action

Example

async function test_casAction () {
 let {session} = await restaflib.casSetup(store);
 // run fetch action
 let p  =
   { action: 'table.fetch',
     data  : { table: { caslib: 'public', name: 'cars' } }
   };
 let casResults = await restaflib.casActionRun(store, session, p);
 print.object(casResults.tables.Fetch, 'Fetched Table');
 await store.apiCall(session.links('delete'));
 }
Clone this wiki locally