mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
FlexServer: remove config from restart endpoint
The config endpoint now handles changing config values, so we only need to handle restarts here.
This commit is contained in:
parent
2d85ed1bfe
commit
bc8e5f6837
@ -1877,14 +1877,13 @@ export class FlexServer implements GristServer {
|
|||||||
const probes = new BootProbes(this.app, this, '/api', adminMiddleware);
|
const probes = new BootProbes(this.app, this, '/api', adminMiddleware);
|
||||||
probes.addEndpoints();
|
probes.addEndpoints();
|
||||||
|
|
||||||
this.app.post('/api/admin/restart', requireInstallAdmin, expressWrap(async (req, resp) => {
|
this.app.post('/api/admin/restart', requireInstallAdmin, expressWrap(async (_, resp) => {
|
||||||
const newConfig = req.body.newConfig;
|
|
||||||
resp.on('finish', () => {
|
resp.on('finish', () => {
|
||||||
// If we have IPC with parent process (e.g. when running under
|
// If we have IPC with parent process (e.g. when running under
|
||||||
// Docker) tell the parent that we have a new environment so it
|
// Docker) tell the parent that we have a new environment so it
|
||||||
// can restart us.
|
// can restart us.
|
||||||
if (process.send) {
|
if (process.send) {
|
||||||
process.send({ action: 'restart', newConfig });
|
process.send({ action: 'restart' });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// On the topic of http response codes, thus spake MDN:
|
// On the topic of http response codes, thus spake MDN:
|
||||||
|
Loading…
Reference in New Issue
Block a user