A lot of work to get the LCI Champions able to add a biography and agree to Terms and Conditions.

This commit is contained in:
Scott Idem
2024-09-12 18:37:03 -04:00
parent 225dd678a5
commit e3b808a0e0
17 changed files with 744 additions and 80 deletions

View File

@@ -276,6 +276,57 @@ export async function load_ae_obj_li__event_session(
}
// Updated 2024-09-12
export async function update_ae_obj__event_session(
{
api_cfg,
event_session_id,
data_kv,
params={},
log_lvl=0
}: {
api_cfg: any,
event_session_id: string,
data_kv: key_val,
params?: key_val,
log_lvl?: number
}
) {
if (log_lvl) {
console.log(`*** update_ae_obj__event_session() *** event_session_id=${event_session_id}`, data_kv);
}
// ae_promises.update__event_session_obj = 'test';
ae_promises.update__event_session_obj = await api.update_ae_obj_id_crud({
api_cfg: api_cfg,
obj_type: 'event_session',
obj_id: event_session_id, // NOTE: This is the FQDN, not normally the ID.
fields: data_kv,
key: api_cfg.api_crud_super_key,
params: params,
return_obj: true,
log_lvl: log_lvl
})
.then(function (event_session_obj_update_result) {
if (event_session_obj_update_result) {
db_save_ae_obj_li__event_session({obj_type: 'event_session', obj_li: [event_session_obj_update_result]});
return event_session_obj_update_result;
} else {
return null;
}
})
.catch(function (error) {
console.log('No results returned or failed.', error);
})
.finally(function () {
});
if (log_lvl) {
console.log('ae_promises.update__event_session_obj:', ae_promises.update__event_session_obj);
}
return ae_promises.update__event_session_obj;
}
// This new function is using CRUD v2. This should allow for more flexibility in the queries.
// Updated 2024-08-14
export async function qry__event_session(
@@ -562,6 +613,7 @@ export function db_save_ae_obj_li__event_session(
poc_person_id: obj.poc_person_id_random,
poc_person_id_random: obj.poc_person_id_random,
poc_kv_json: obj.poc_kv_json,
name: obj.name,
description: obj.description,
@@ -600,7 +652,6 @@ export function db_save_ae_obj_li__event_session(
poc_person_full_name: obj.poc_person_full_name,
poc_person_primary_email: obj.poc_person_primary_email,
poc_person_passcode: obj.poc_person_passcode,
poc_kv_json: obj.poc_kv_json,
event_name: obj.event_name,