From: charleswrayjr Date: Sat, 6 Sep 2025 01:34:03 +0000 (-0500) Subject: Testing get docker containers path. X-Git-Url: https://git.phasecustomsoft.com/manifest.json?a=commitdiff_plain;h=3fbd12e79def1f20b60c56b837e192758ca3bfe1;p=phs-api.git Testing get docker containers path. --- diff --git a/src/controllers/docker.controller.js b/src/controllers/docker.controller.js index 475310e..f9b42ef 100644 --- a/src/controllers/docker.controller.js +++ b/src/controllers/docker.controller.js @@ -29,7 +29,7 @@ module.exports = { } }, getContainers:async ( req, res, next ) => { try { - const { all } = req.body; + const { all } = req.query; const containers = await docker.listContainers( { all } ); res.json( { containers:containers.map( c => ({ diff --git a/src/controllers/git.controller.js b/src/controllers/git.controller.js index 756a833..d6c2619 100755 --- a/src/controllers/git.controller.js +++ b/src/controllers/git.controller.js @@ -13,8 +13,7 @@ module.exports = { const conn = new Client(); conn.on( 'ready', () => { const commands = type === 'private' ? [`mkdir /opt/git/${ name }.git`, `cd /opt/git/${ name }.git`, `git init --bare`, `chown -R ${ user }:git /opt/git/${ name }.git`, `chmod -R u+rwX,go-rwx /opt/git/${ name }.git`,] : [`mkdir /opt/git/${ name }.git`, `cd /opt/git/${ name }.git`, `git init --bare --shared=group`, `chown -R ${ user }:git /opt/git/${ name }.git`, `chmod -R g+rwX /opt/git/${ name }.git`, `find /opt/git/${ name }.git -type d -exec chmod g+s {} \\;`, `git config core.sharedRepository group`,]; - console.log( commands ); - console.log( [...commands].join( ' && ' ) ); + conn.exec( commands.join( ' && ' ), ( err, stream ) => { if (err) { conn.end();