| | |
| | | |
| | | async function getUserByLogin (login) { |
| | | const sel = `usr_id, login, firstname, lastname, gender, email, institution, street, city, zipcode, country, department, active` |
| | | // TODO user defined fields |
| | | // TODO check args for SQL Injection |
| | | |
| | | const pool = await poolP |
| | |
| | | FROM ${database}.usr_data AS ud |
| | | WHERE login = '${login}'` |
| | | ) |
| | | console.log(results) |
| | | return joinUDF(results[0]) |
| | | } |
| | | |
| | | async function getUserByUserId (userId) { |
| | | const sel = `usr_id, login, firstname, lastname, gender, email, institution, street, city, zipcode, country, department, active` |
| | | // TODO user defined fields |
| | | // TODO check args for SQL Injection |
| | | |
| | | const pool = await poolP |
| | |
| | | |
| | | async function getKurs (ref_id) { |
| | | const pool = await poolP |
| | | const q = `SELECT or2.ref_id, or2.obj_id, od.title, od.description, od.type |
| | | const q = `SELECT or2.ref_id, or2.obj_id, od.title, od.description, od.type, od.create_date |
| | | FROM ${database}.object_reference or2 |
| | | INNER JOIN ${database}.object_data od ON od.obj_id = or2.obj_id |
| | | WHERE or2.ref_id = '${ref_id}' |