async function findWriterProfileById(writer_id) {
    const writer = await db("writer_profiles")
        .where({
            writer_id,
        })
        .first();
    if (writer === undefined) return undefined;
    const workHistory = await findWorkHistoryById(writer_id);
    return {
        ...writer,
        workHistory,
    };
}
// returns a specific writer  profile or null
returns a specific writer  profile or null
returns a specific writer profile or null
async function findWriterProfileById(writer_id) {
    const writer = await db("writer_profiles")
        .where({
            writer_id,
        })
        .first();
    if (writer === undefined) return undefined;
    const workHistory = await findWorkHistoryById(writer_id);
    return {
        ...writer,
        workHistory,
    };
}
async function findWriterProfileById ( writer_id ) { const writer = await db ( "writer_profiles" ) . where ( { writer_id , } ) . first ( ) ; if ( writer === undefined ) return undefined ; const workHistory = await findWorkHistoryById ( writer_id ) ; return { ... writer , workHistory , } ; }
returns a specific writer  profile or null
returns a specific writer profile or null