]> PHS Git Server - phs-api.git/commitdiff
Testing get docker containers path.
authorcharleswrayjr <charleswrayjr@gmail.com>
Sat, 6 Sep 2025 01:34:03 +0000 (20:34 -0500)
committercharleswrayjr <charleswrayjr@gmail.com>
Sat, 6 Sep 2025 01:34:03 +0000 (20:34 -0500)
src/controllers/docker.controller.js
src/controllers/git.controller.js

index 475310e74b09c2d88185f0826e2bd250f6b1aa4c..f9b42effb1f38b7998806f395be0cea627172514 100644 (file)
@@ -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 => ({
index 756a8332bf73ba4e10cd02f34bcfb82403651a45..d6c2619011340cbd452d25b02e191c43e939142f 100755 (executable)
@@ -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();