auth fix 7

This commit is contained in:
Kallesh B S 2025-09-27 18:21:36 +05:30
parent 1a08f98548
commit 570037c6d9

View File

@ -804,7 +804,7 @@ export class CarnetApplicationService {
await client.query(`CLOSE ${cursorName}`); await client.query(`CLOSE ${cursorName}`);
await client.query('COMMIT'); await client.query('COMMIT');
return toUpperCaseKeys(fetchResult.rows); return toUpperCaseKeys(fetchResult.rows)[0] ?? [];
} catch (error) { } catch (error) {
if (client) await client.query('ROLLBACK'); if (client) await client.query('ROLLBACK');
@ -1088,7 +1088,16 @@ export class CarnetApplicationService {
await client.query(`CLOSE ${cursorName}`); await client.query(`CLOSE ${cursorName}`);
await client.query('COMMIT'); await client.query('COMMIT');
return toUpperCaseKeys(fetchResult.rows)[0] ?? []; let fres = toUpperCaseKeys(fetchResult.rows);
// return toUpperCaseKeys(fetchResult.rows)[0] ?? [];
return fres.length > 0 ?
{
NOOFUSSETS: fres[0].NOOFUSSETS,
P_COUNTRYTABLE: fres.map(({ NOOFUSSETS, ...rest }) => rest)
}
: {};
} catch (error) { } catch (error) {
if (client) await client.query('ROLLBACK'); if (client) await client.query('ROLLBACK');
@ -1691,7 +1700,7 @@ export class CarnetApplicationService {
await client.query(`CLOSE ${cursorName}`); await client.query(`CLOSE ${cursorName}`);
await client.query('COMMIT'); await client.query('COMMIT');
return toUpperCaseKeys(fetchResult.rows)[0] ?? []; return toUpperCaseKeys(fetchResult.rows)[0] ?? {};
} catch (error) { } catch (error) {
if (client) await client.query('ROLLBACK'); if (client) await client.query('ROLLBACK');