feat(postgresql): add auth and primitive actions
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { IGlobalVariable, IJSONObject } from '@automatisch/types';
|
||||
import { Knex } from 'knex'
|
||||
import logger from '../../../helpers/logger';
|
||||
|
||||
const setParams = async ($: IGlobalVariable, client: Knex<any, unknown[]>) : Promise<Knex.Raw<any>> => {
|
||||
|
||||
const params : any = $.step.parameters.params
|
||||
let paramsObj : IJSONObject = {}
|
||||
params.forEach( (ele: any) => { paramsObj[ele.configParam] = ele.value } )
|
||||
|
||||
for (const key in paramsObj) {
|
||||
const res = await client.raw(`SET ${key} = '${paramsObj[key]}'`);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
export default setParams;
|
Reference in New Issue
Block a user