mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
WIP
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { json, Request, Response, NextFunction } from 'express';
|
||||
import express from 'express';
|
||||
import helmet from 'helmet';
|
||||
import boom from 'express-boom';
|
||||
import errorHandler from 'errorhandler';
|
||||
@@ -42,6 +43,8 @@ export default ({ app }) => {
|
||||
// Middleware for intercepting and transforming json responses.
|
||||
app.use(JSONResponseTransformer(snakecaseResponseTransformer));
|
||||
|
||||
app.use('/public', express.static(path.join(global.__storage_dir)));
|
||||
|
||||
// Handle multi-media requests.
|
||||
app.use(
|
||||
fileUpload({
|
||||
|
||||
@@ -60,6 +60,7 @@ import Time from 'models/Time';
|
||||
import Task from 'models/Task';
|
||||
import TaxRate from 'models/TaxRate';
|
||||
import TaxRateTransaction from 'models/TaxRateTransaction';
|
||||
import Attachment from 'models/Attachment';
|
||||
|
||||
export default (knex) => {
|
||||
const models = {
|
||||
@@ -123,6 +124,7 @@ export default (knex) => {
|
||||
Task,
|
||||
TaxRate,
|
||||
TaxRateTransaction,
|
||||
Attachment
|
||||
};
|
||||
return mapValues(models, (model) => model.bindKnex(knex));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user