Skip to content

Commit 2ae5693

Browse files
authored
Merge pull request ibm-messaging#241 from harshitsharma2801/master
Cleaned Unecessary condition in spring-boot mvc
2 parents 58f8e8c + 64bc85a commit 2ae5693

File tree

1 file changed

+5
-5
lines changed
  • SpringBoot-MVC/src/main/resources/static

1 file changed

+5
-5
lines changed

SpringBoot-MVC/src/main/resources/static/script.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2022, 2023 IBM Corp.
2+
* Copyright 2022, 2024 IBM Corp.
33
*
44
* Licensed under the Apache License, Version 2.0 (the 'License');
55
* you may not use this file except in compliance with the License.
@@ -94,8 +94,6 @@ async function sendMessage() {
9494

9595
if (res.status === true) {
9696
addMessage(res.data);
97-
} else {
98-
addMessage(res.data);
9997
}
10098

10199
spinner.style.display = "none";
@@ -104,8 +102,10 @@ async function sendMessage() {
104102
async function getMessage() {
105103
const spinner = document.querySelector(".spinner");
106104
spinner.style.display = "block";
107-
let msg = await performGet();
108-
addMessage(msg.data);
105+
let res = await performGet();
106+
if (res.status == true) {
107+
addMessage(res.data);
108+
}
109109
spinner.style.display = "none";
110110
}
111111

0 commit comments

Comments
 (0)