mailtrain/lib/context-helpers.js
Tomas Bures f6e1938ff9 Lists list and CUD
Custom forms list
Updated DB schema (not yet implemented in the server, which means that most of the server is not broken).
- custom forms are independent of a list
- order and visibility of fields is now in custom_fields
- first_name and last_name has been turned to a regular custom field
2017-07-29 22:42:07 +03:00

30 lines
No EOL
449 B
JavaScript

'use strict';
const knex = require('../lib/knex');
function getRequestContext(req) {
const context = {
user: req.user
};
return context;
}
function getAdminContext() {
const context = {
user: {
admin: true,
id: 0,
username: '',
name: '',
email: ''
}
};
return context;
}
module.exports = {
getRequestContext,
getAdminContext
};