Fixed bundling into an exe not working as intended.
This commit is contained in:
21
electron/api/rpc/rpc.controller.js
Normal file
21
electron/api/rpc/rpc.controller.js
Normal file
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.init = init;
|
||||
exports.setRPC = setRPC;
|
||||
const rp_service_1 = require("./rp.service");
|
||||
let initialized = false;
|
||||
function init() {
|
||||
if (!initialized) {
|
||||
(0, rp_service_1.initRPC)(process.env.DISCORD_CLIENT_ID);
|
||||
initialized = true;
|
||||
}
|
||||
}
|
||||
async function setRPC(request, reply) {
|
||||
const { details, state, mode } = request.body;
|
||||
(0, rp_service_1.setActivity)({
|
||||
details,
|
||||
state,
|
||||
mode
|
||||
});
|
||||
return reply.send({ ok: true });
|
||||
}
|
||||
Reference in New Issue
Block a user