-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
I've encountered a few issues whhile working on rustyshare:
- the content type of REST request is not
application/json - the code for sending a chat message is using
rsmsgsas URL (which should bersMsgs)
Here is a patch
diff --git a/webui-src/app/chat/chat.js b/webui-src/app/chat/chat.js
index aab96e9..39564cf 100644
--- a/webui-src/app/chat/chat.js
+++ b/webui-src/app/chat/chat.js
@@ -212,7 +212,7 @@ const ChatLobbyModel = {
},
sendMessage(msg, onsuccess) {
rs.rsJsonApiRequest(
- '/rsmsgs/sendChat',
+ '/rsMsgs/sendChat',
{},
() => {
// adding own message to log
diff --git a/webui-src/app/rswebui.js b/webui-src/app/rswebui.js
index 773b297..3505985 100644
--- a/webui-src/app/rswebui.js
+++ b/webui-src/app/rswebui.js
@@ -28,6 +28,7 @@ function rsJsonApiRequest(
config = null
) {
headers['Accept'] = 'application/json';
+ headers['content-type'] = 'application/json';
if (loginKey.isVerified) {
headers['Authorization'] = 'Basic ' + btoa(loginKey.username + ':' + loginKey.passwd);
}
defnax
Metadata
Metadata
Assignees
Labels
No labels