Last active
October 16, 2024 14:05
-
-
Save flancer64/e1a41f57169329452244db99aabd89a8 to your computer and use it in GitHub Desktop.
The template for an Action code used in TeqFW.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Read user data from RDB. | |
* | |
* @implements TeqFw_Core_Shared_Api_Act | |
*/ | |
export default class Dialog_Back_Mod_User_A_Read { | |
/** | |
* @param {TeqFw_Db_Back_Api_RDb_CrudEngine} crud | |
* @param {Dialog_Back_Store_RDb_Schema_User} rdbUser | |
*/ | |
constructor( | |
{ | |
TeqFw_Db_Back_Api_RDb_CrudEngine$: crud, | |
Dialog_Back_Store_RDb_Schema_User$: rdbUser, | |
} | |
) { | |
// VARS | |
const ATTR = rdbUser.getAttributes(); | |
// MAIN | |
/** | |
* @param {TeqFw_Db_Back_RDb_ITrans} trx | |
* @param {string} [uuid] | |
* @return {Promise<Dialog_Back_Store_RDb_Schema_User.Dto>} | |
*/ | |
this.act = async function ({trx, uuid}) { | |
if (uuid) { | |
return await crud.readOne(trx, rdbUser, {[ATTR.UUID]: uuid}); | |
} | |
return null; | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment