swapped to double quotes

swapped to double quotes from singles on service functions
This commit is contained in:
Lance Cain 2024-10-30 09:56:17 -04:00
parent 635bf624e8
commit 1dd3205b30
2 changed files with 9 additions and 9 deletions

View file

@ -254,7 +254,7 @@ export class DockerSocketHandler extends AgentSocketHandler {
stack.joinCombinedTerminal(socket); // Ensure the combined terminal is joined
callbackResult({
ok: true,
msg: `Service ${serviceName} started`
msg: "Service" + serviceName + " started"
}, callback);
server.sendStackList();
} catch (e) {
@ -275,7 +275,7 @@ export class DockerSocketHandler extends AgentSocketHandler {
await stack.stopService(socket, serviceName);
callbackResult({
ok: true,
msg: `Service ${serviceName} stopped`
msg: "Service" + serviceName + " stopped"
}, callback);
server.sendStackList();
} catch (e) {
@ -283,19 +283,19 @@ export class DockerSocketHandler extends AgentSocketHandler {
}
});
agentSocket.on('restartService', async (stackName: unknown, serviceName: unknown, callback) => {
agentSocket.on("restartService", async (stackName: unknown, serviceName: unknown, callback) => {
try {
checkLogin(socket);
if (typeof stackName !== 'string' || typeof serviceName !== 'string') {
throw new Error('Invalid stackName or serviceName');
if (typeof stackName !== "string" || typeof serviceName !== "string") {
throw new Error("Invalid stackName or serviceName");
}
const stack = await Stack.getStack(server, stackName, true);
await stack.restartService(socket, serviceName);
callbackResult({
ok: true,
msg: `Service ${serviceName} restarted`
msg: "Service" + serviceName + " restarted"
}, callback);
} catch (e) {
callbackError(e, callback);

View file

@ -306,13 +306,13 @@ export default defineComponent({
delete this.jsonObject.services[this.name];
},
startService() {
this.$emit('start-service', this.name);
this.$emit("start-service", this.name);
},
stopService() {
this.$emit('stop-service', this.name);
this.$emit("stop-service", this.name);
},
restartService() {
this.$emit('restart-service', this.name);
this.$emit("restart-service", this.name);
}
}