mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 10:55:55 +01:00
more complete support for network-less electron frontend-backend communication including protected session
This commit is contained in:
12
app.js
12
app.js
@@ -80,16 +80,24 @@ if (utils.isElectron()) {
|
||||
req.url = arg.url;
|
||||
req.method = arg.method;
|
||||
req.body = arg.data;
|
||||
req.headers = {};
|
||||
req.headers = arg.headers;
|
||||
|
||||
const res = {
|
||||
statusCode: 200
|
||||
};
|
||||
|
||||
const res = {};
|
||||
res.setHeader = function() {
|
||||
|
||||
};
|
||||
|
||||
res.status = function(statusCode) {
|
||||
res.statusCode = statusCode;
|
||||
};
|
||||
|
||||
res.send = function(obj) {
|
||||
event.sender.send('server-response', {
|
||||
requestId: arg.requestId,
|
||||
statusCode: res.statusCode,
|
||||
body: obj
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user