-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrouter.js
More file actions
25 lines (19 loc) · 876 Bytes
/
router.js
File metadata and controls
25 lines (19 loc) · 876 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"use strict";
var FilesController = require("./controllers/FilesController");
var LedgersController = require("./controllers/LedgersController");
var ProofsController = require("./controllers/ProofsController");
var jsonParser = require("body-parser").json();
module.exports = function(app) {
/* Files API */
app.get ("/api/get-file/:id", FilesController.api.GetFile);
app.post("/api/upload/:file", FilesController.api.Upload);
/* Files Web */
app.get ("/file-upload", FilesController.Index);
/* Proofs Web */
app.get ("/proofs", ProofsController.Index);
app.get ("/proofs/:id", ProofsController.ProofById);
app.get ("/api/proofs/next", ProofsController.NextProof);
app.put ("/api/proofs/:id", jsonParser, ProofsController.SaveById);
/* Accounting Web */
app.get ("/ledgers/views/pro", LedgersController.LedgersViewsPro);
};