REST Service for POPCORN - ILIAS
alex
2025-11-17 3fce3e400fd44d3b6f345a31413e0ad2b7724107
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 <obj_id>", "get ref_id using <obj_id>",)
   .strict()
   .parse()
 
console.log(`argv.obj_id=${argv.obj_id}`)
 
run(argv)
   .then(console.log)
   .catch(console.error)
   .finally(process.exit)
 
async function run({obj_id}) {
   return await db.getRefIdFromObjId(obj_id)
}