aboutsummaryrefslogtreecommitdiff
path: root/dist/FileRouter.js
diff options
context:
space:
mode:
authortrh2018-02-02 16:44:22 +0000
committertrh2018-02-02 16:44:22 +0000
commit1cbba971bbadda335c016d8a7dc0883aa1135bbc (patch)
tree57c388e5c3750c3571f9d7f60a6810a02e1b4637 /dist/FileRouter.js
parentMerge branch 'trh/ts-node' into 'master' (diff)
downloadmedicine-1cbba971bbadda335c016d8a7dc0883aa1135bbc.tar.gz
medicine-1cbba971bbadda335c016d8a7dc0883aa1135bbc.zip

Tidied Some Repo Things

Diffstat (limited to 'dist/FileRouter.js')
-rw-r--r--dist/FileRouter.js47
1 files changed, 0 insertions, 47 deletions
diff --git a/dist/FileRouter.js b/dist/FileRouter.js
deleted file mode 100644
index adf87cc..0000000
--- a/dist/FileRouter.js
+++ /dev/null
@@ -1,47 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-const express_1 = require("express");
-const Files = null; //require('../data');
-/*
- * |->
- * /project/files/directory/file?filters
- * |->
- */
-class FileRouter {
- /**
- * Initialize the FileRouter
- */
- constructor() {
- this.router = express_1.Router();
- this.init();
- }
- /**
- * GET a File.
- */
- getFile(req, res, next) {
- let fileID = req.params.file;
- // check if fileID is number or path
- // find file in data
- // check if only metadata was requested and return appropriate info
- // otherwise:
- // if image:
- // convert if necessary
- // zoom if necessary
- // if csv/xls
- // send data in appropriate csv format
- // limit cols if necessary
- res.send("File");
- }
- /**
- * Take each handler, and attach to one of the Express.Router's
- * endpoints.
- */
- init() {
- this.router.get('/:file', this.getFile);
- }
-}
-exports.FileRouter = FileRouter;
-// Create the FileRouter, and export its configured Express.Router
-const fileRoutes = new FileRouter();
-fileRoutes.init();
-exports.default = fileRoutes.router;