mirror of
https://github.com/BreizhHardware/jellyseerr.git
synced 2026-03-18 21:50:40 +01:00
fix: add missing content-type header (#887)
* fix: add missing headers when commenting on an issue * fix: more missing content-type headers in post requests
This commit is contained in:
@@ -181,6 +181,9 @@ const IssueComment = ({
|
|||||||
`/api/v1/issueComment/${comment.id}`,
|
`/api/v1/issueComment/${comment.id}`,
|
||||||
{
|
{
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
body: JSON.stringify({ message: values.newMessage }),
|
body: JSON.stringify({ message: values.newMessage }),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -126,6 +126,9 @@ const IssueDetails = () => {
|
|||||||
try {
|
try {
|
||||||
const res = await fetch(`/api/v1/issueComment/${firstComment.id}`, {
|
const res = await fetch(`/api/v1/issueComment/${firstComment.id}`, {
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
body: JSON.stringify({ message: newMessage }),
|
body: JSON.stringify({ message: newMessage }),
|
||||||
});
|
});
|
||||||
if (!res.ok) throw new Error();
|
if (!res.ok) throw new Error();
|
||||||
@@ -501,6 +504,9 @@ const IssueDetails = () => {
|
|||||||
`/api/v1/issue/${issueData?.id}/comment`,
|
`/api/v1/issue/${issueData?.id}/comment`,
|
||||||
{
|
{
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
body: JSON.stringify({ message: values.message }),
|
body: JSON.stringify({ message: values.message }),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -59,6 +59,9 @@ const AddEmailModal: React.FC<AddEmailModalProps> = ({
|
|||||||
try {
|
try {
|
||||||
const res = await fetch('/api/v1/auth/jellyfin', {
|
const res = await fetch('/api/v1/auth/jellyfin', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
username: username,
|
username: username,
|
||||||
password: password,
|
password: password,
|
||||||
|
|||||||
@@ -45,6 +45,9 @@ const Login = () => {
|
|||||||
try {
|
try {
|
||||||
const res = await fetch('/api/v1/auth/plex', {
|
const res = await fetch('/api/v1/auth/plex', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
body: JSON.stringify({ authToken }),
|
body: JSON.stringify({ authToken }),
|
||||||
});
|
});
|
||||||
if (!res.ok) throw new Error();
|
if (!res.ok) throw new Error();
|
||||||
|
|||||||
Reference in New Issue
Block a user