Compare commits
2 Commits
a0be8f0aa3
...
7c7b38e869
| Author | SHA1 | Date |
|---|---|---|
|
|
7c7b38e869 | |
|
|
8e06d465cb |
|
|
@ -2,13 +2,13 @@ module.exports = {
|
||||||
database: {
|
database: {
|
||||||
owner: {
|
owner: {
|
||||||
host: '127.0.0.1',
|
host: '127.0.0.1',
|
||||||
user: 'user',
|
user: 'traxxx',
|
||||||
password: 'password',
|
password: 'password',
|
||||||
database: 'traxxx',
|
database: 'traxxx',
|
||||||
},
|
},
|
||||||
query: {
|
query: {
|
||||||
host: '127.0.0.1',
|
host: '127.0.0.1',
|
||||||
user: 'user',
|
user: 'visitor',
|
||||||
password: 'password',
|
password: 'password',
|
||||||
database: 'traxxx',
|
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}`;
|
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(
|
module.exports = postgraphile(
|
||||||
connectionString,
|
connectionString,
|
||||||
'public',
|
'public',
|
||||||
|
|
@ -37,4 +43,5 @@ module.exports = postgraphile(
|
||||||
...ReleasePlugins,
|
...ReleasePlugins,
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
pgSettings,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue