Compare commits
2 Commits
a0be8f0aa3
...
7c7b38e869
Author | SHA1 | Date |
---|---|---|
|
7c7b38e869 | |
|
8e06d465cb |
|
@ -2,13 +2,13 @@ module.exports = {
|
|||
database: {
|
||||
owner: {
|
||||
host: '127.0.0.1',
|
||||
user: 'user',
|
||||
user: 'traxxx',
|
||||
password: 'password',
|
||||
database: 'traxxx',
|
||||
},
|
||||
query: {
|
||||
host: '127.0.0.1',
|
||||
user: 'user',
|
||||
user: 'visitor',
|
||||
password: 'password',
|
||||
database: 'traxxx',
|
||||
},
|
||||
|
|
|
@ -12,6 +12,12 @@ const { ActorPlugins, SitePlugins, ReleasePlugins } = require('./plugins/plugins
|
|||
|
||||
const connectionString = `postgres://${config.database.query.user}:${config.database.query.password}@${config.database.query.host}:5432/${config.database.query.database}`;
|
||||
|
||||
async function pgSettings(req) {
|
||||
return {
|
||||
'user.id': req.session.user?.id,
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = postgraphile(
|
||||
connectionString,
|
||||
'public',
|
||||
|
@ -37,4 +43,5 @@ module.exports = postgraphile(
|
|||
...ReleasePlugins,
|
||||
],
|
||||
},
|
||||
pgSettings,
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue