chore(postgresql): rename app folder and add icon

This commit is contained in:
Ali BARIN
2023-05-09 19:37:06 +00:00
parent 0c8343e76f
commit f29ccace2a
19 changed files with 214 additions and 263 deletions

View File

@@ -0,0 +1,23 @@
import { IGlobalVariable } from '@automatisch/types';
import logger from '../../../helpers/logger';
import getClient from '../common/postgres-client';
const verifyCredentials = async ($: IGlobalVariable) => {
const pgClient = getClient($);
const checkConnection = await pgClient.raw('SELECT 1');
logger.debug(checkConnection);
await $.auth.set({
screenName: `${$.auth.data.user}@${$.auth.data.host}:${$.auth.data.port}/${$.auth.data.database}`,
client: 'pg',
version: $.auth.data.version,
host: $.auth.data.host,
port: Number($.auth.data.port),
user: $.auth.data.user,
password: $.auth.data.password,
database: $.auth.data.database
});
};
export default verifyCredentials;