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
30 lines
No EOL
449 B
JavaScript
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
|
|
}; |