New project structure
Beta of extract.js for extracting english locale
This commit is contained in:
parent
e18d2b2f84
commit
2edbd67205
247 changed files with 6405 additions and 4237 deletions
30
server/lib/context-helpers.js
Normal file
30
server/lib/context-helpers.js
Normal file
|
@ -0,0 +1,30 @@
|
|||
'use strict';
|
||||
|
||||
const knex = require('./knex');
|
||||
|
||||
function getRequestContext(req) {
|
||||
const context = {
|
||||
user: req.user
|
||||
};
|
||||
|
||||
return context;
|
||||
}
|
||||
|
||||
const adminContext = {
|
||||
user: {
|
||||
admin: true,
|
||||
id: 0,
|
||||
username: '',
|
||||
name: '',
|
||||
email: ''
|
||||
}
|
||||
};
|
||||
|
||||
function getAdminContext() {
|
||||
return adminContext;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getRequestContext,
|
||||
getAdminContext
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue