OSDN Git Service

[Develop and Manual test] /api/v1/all/workspace/directory v0.3.0p0030
authorhimetani_cafe <fumifumi@yasunaga-lab.bio.kyutech.ac.jp>
Wed, 3 Feb 2016 04:59:38 +0000 (13:59 +0900)
committerhimetani_cafe <fumifumi@yasunaga-lab.bio.kyutech.ac.jp>
Wed, 3 Feb 2016 04:59:38 +0000 (13:59 +0900)
front-end/app/scripts/services/APIEndPoint.ts
front-end/dist/bundle.js
server/api/v1/all/workspace/directory/index.js [new file with mode: 0644]
server/routes.js

index 865b3bc..60adc23 100644 (file)
@@ -32,5 +32,11 @@ namespace app.services {
             }
             return <declares.IResponseFileInfo>this.resource(endPoint).get();
         }
+
+        public getDirectories(): ng.resource.IResource<declares.IResponse> {
+            var endPoint = '/spi/v1/workspace/';
+
+            return this.resource(endPoint).get();
+        }
     }
 }
index bfadc62..aabada4 100644 (file)
                        }
                        return this.resource(endPoint).get();
                    };
+                   APIEndPoint.prototype.getDirectories = function () {
+                       var endPoint = '/spi/v1/workspace/';
+                       return this.resource(endPoint).get();
+                   };
                    return APIEndPoint;
                })();
                services.APIEndPoint = APIEndPoint;
                        }
                        return this.resource(endPoint).get();
                    };
+                   APIEndPoint.prototype.getDirectories = function () {
+                       var endPoint = '/spi/v1/workspace/';
+                       return this.resource(endPoint).get();
+                   };
                    return APIEndPoint;
                })();
                services.APIEndPoint = APIEndPoint;
                        }
                        return this.resource(endPoint).get();
                    };
+                   APIEndPoint.prototype.getDirectories = function () {
+                       var endPoint = '/spi/v1/workspace/';
+                       return this.resource(endPoint).get();
+                   };
                    return APIEndPoint;
                })();
                services.APIEndPoint = APIEndPoint;
                        }
                        return this.resource(endPoint).get();
                    };
+                   APIEndPoint.prototype.getDirectories = function () {
+                       var endPoint = '/spi/v1/workspace/';
+                       return this.resource(endPoint).get();
+                   };
                    return APIEndPoint;
                })();
                services.APIEndPoint = APIEndPoint;
                        }
                        return this.resource(endPoint).get();
                    };
+                   APIEndPoint.prototype.getDirectories = function () {
+                       var endPoint = '/spi/v1/workspace/';
+                       return this.resource(endPoint).get();
+                   };
                    return APIEndPoint;
                })();
                services.APIEndPoint = APIEndPoint;
                        }
                        return this.resource(endPoint).get();
                    };
+                   APIEndPoint.prototype.getDirectories = function () {
+                       var endPoint = '/spi/v1/workspace/';
+                       return this.resource(endPoint).get();
+                   };
                    return APIEndPoint;
                })();
                services.APIEndPoint = APIEndPoint;
                        }
                        return this.resource(endPoint).get();
                    };
+                   APIEndPoint.prototype.getDirectories = function () {
+                       var endPoint = '/spi/v1/workspace/';
+                       return this.resource(endPoint).get();
+                   };
                    return APIEndPoint;
                })();
                services.APIEndPoint = APIEndPoint;
                        }
                        return this.resource(endPoint).get();
                    };
+                   APIEndPoint.prototype.getDirectories = function () {
+                       var endPoint = '/spi/v1/workspace/';
+                       return this.resource(endPoint).get();
+                   };
                    return APIEndPoint;
                })();
                services.APIEndPoint = APIEndPoint;
                        }
                        return this.resource(endPoint).get();
                    };
+                   APIEndPoint.prototype.getDirectories = function () {
+                       var endPoint = '/spi/v1/workspace/';
+                       return this.resource(endPoint).get();
+                   };
                    return APIEndPoint;
                })();
                services.APIEndPoint = APIEndPoint;
                        }
                        return this.resource(endPoint).get();
                    };
+                   APIEndPoint.prototype.getDirectories = function () {
+                       var endPoint = '/spi/v1/workspace/';
+                       return this.resource(endPoint).get();
+                   };
                    return APIEndPoint;
                })();
                services.APIEndPoint = APIEndPoint;
                        }
                        return this.resource(endPoint).get();
                    };
+                   APIEndPoint.prototype.getDirectories = function () {
+                       var endPoint = '/spi/v1/workspace/';
+                       return this.resource(endPoint).get();
+                   };
                    return APIEndPoint;
                })();
                services.APIEndPoint = APIEndPoint;
diff --git a/server/api/v1/all/workspace/directory/index.js b/server/api/v1/all/workspace/directory/index.js
new file mode 100644 (file)
index 0000000..befe924
--- /dev/null
@@ -0,0 +1,17 @@
+'use strict';
+
+var express    = require('express');
+var router     = express.Router()
+var path       = require('path')
+var formidable = require('formidable')
+var db = require(__dirname + '/../../../../../../server/class/DB').instance;
+
+router.get('/', function(req, res) {
+    console.log('hogehoge');
+    db.getDirectories()
+    .then(function(dirs) {
+        res.send(dirs);
+    })
+});
+
+module.exports = router;
index 144f69e..d40a915 100644 (file)
@@ -19,7 +19,8 @@ module.exports = function(app) {
     */
     app.use('/api/v1/fileUpload', require(__dirname + '/api/v1/fileUpload'));
     app.use('/api/v1/execution', require(__dirname + '/api/v1/execution'));
-    app.use('/api/v1/workspace', require(__dirname + '/api/v1/workspace'));
+    app.use('/api/v1/workspace/', require(__dirname + '/api/v1/workspace'));
+    app.use('/api/v1/all/workspace/directory', require(__dirname + '/api/v1/all/workspace/directory'));
 
     app.route('/*')
     .get(function(req, res) {