REST Service for POPCORN - ILIAS
alex
2025-06-30 2c78c2d07579186caad5519e8843a2f583fe6bc0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
const db = require("../lib/db")
const yargs = require("yargs")
 
/////////////////////////////////////////////////////////////////////////
 
const argv = yargs
   .usage("$0 <ref_id>", "get kurs using <ref_id>",)
   .strict()
   .parse()
 
console.log(`argv.ref_id=${argv.ref_id}`)
 
run(argv)
   .then(console.log)
   .catch(console.error)
   .finally(process.exit)
 
async function run({ref_id}) {
   return await db.getKursItems(ref_id)
}