Removed useless UTF-8 decleration

This commit is contained in:
Tracker-Friendly 2024-02-27 17:50:45 +00:00
parent 8af123968a
commit 0c0f265667
4 changed files with 15 additions and 57 deletions

View File

@ -1,7 +1,7 @@
# Burgernotes API docs # Burgernotes API docs
Use the Burgernotes API to automate tasks, build your own client, and more! Use the Burgernotes API to automate tasks, build your own client, and more!
Headers should be: "Content-type: application/json; charset=UTF-8" for all POSTs Content-type should be "application/json" for all POSTs
## Authentication ## Authentication

View File

@ -116,10 +116,7 @@ signupButton.addEventListener("click", (event) => {
password: await hashpass(password), password: await hashpass(password),
passwordchange: "no", passwordchange: "no",
newpass: "null" newpass: "null"
}), })
headers: {
"Content-Type": "application/json; charset=UTF-8"
}
}) })
.then((response) => response) .then((response) => response)
.then((response) => { .then((response) => {
@ -140,10 +137,7 @@ signupButton.addEventListener("click", (event) => {
password: await hashpassold(password), password: await hashpassold(password),
passwordchange: "yes", passwordchange: "yes",
newpass: await hashpass(password) newpass: await hashpass(password)
}), })
headers: {
"Content-Type": "application/json; charset=UTF-8"
}
}) })
.then((response) => response) .then((response) => response)
.then((response) => { .then((response) => {

View File

@ -201,10 +201,7 @@ function updateUserInfo() {
method: "POST", method: "POST",
body: JSON.stringify({ body: JSON.stringify({
secretKey: secretkey secretKey: secretkey
}), })
headers: {
"Content-Type": "application/json; charset=UTF-8"
}
}) })
.then((response) => response) .then((response) => response)
.then((response) => { .then((response) => {
@ -248,10 +245,7 @@ deleteMyAccountButton.addEventListener("click", (event) => {
method: "POST", method: "POST",
body: JSON.stringify({ body: JSON.stringify({
secretKey: secretkey secretKey: secretkey
}), })
headers: {
"Content-Type": "application/json; charset=UTF-8"
}
}) })
.then((response) => response) .then((response) => response)
.then((response) => { .then((response) => {
@ -271,10 +265,7 @@ sessionManagerButton.addEventListener("click", (event) => {
method: "POST", method: "POST",
body: JSON.stringify({ body: JSON.stringify({
secretKey: secretkey secretKey: secretkey
}), })
headers: {
"Content-Type": "application/json; charset=UTF-8"
}
}) })
.then((response) => response) .then((response) => response)
.then((response) => { .then((response) => {
@ -312,10 +303,7 @@ sessionManagerButton.addEventListener("click", (event) => {
body: JSON.stringify({ body: JSON.stringify({
secretKey: secretkey, secretKey: secretkey,
sessionId: responseData[i]["id"] sessionId: responseData[i]["id"]
}), })
headers: {
"Content-Type": "application/json; charset=UTF-8"
}
}) })
.then((response) => response) .then((response) => response)
.then((response) => { .then((response) => {
@ -363,10 +351,7 @@ function selectNote(nameithink) {
body: JSON.stringify({ body: JSON.stringify({
secretKey: secretkey, secretKey: secretkey,
noteId: nameithink, noteId: nameithink,
}), })
headers: {
"Content-Type": "application/json; charset=UTF-8"
}
}) })
.catch((error) => { .catch((error) => {
noteBox.readOnly = true noteBox.readOnly = true
@ -402,10 +387,7 @@ function selectNote(nameithink) {
secretKey: secretkey, secretKey: secretkey,
noteId: nameithink, noteId: nameithink,
content: encryptedText, content: encryptedText,
}), })
headers: {
"Content-Type": "application/json; charset=UTF-8"
}
}) })
.then((response) => response) .then((response) => response)
.then((response) => { .then((response) => {
@ -429,10 +411,7 @@ function updateNotes() {
method: "POST", method: "POST",
body: JSON.stringify({ body: JSON.stringify({
secretKey: secretkey secretKey: secretkey
}), })
headers: {
"Content-Type": "application/json; charset=UTF-8"
}
}) })
.then((response) => response) .then((response) => response)
.then((response) => { .then((response) => {
@ -464,10 +443,7 @@ function updateNotes() {
body: JSON.stringify({ body: JSON.stringify({
secretKey: secretkey, secretKey: secretkey,
noteId: responseData[i]["id"] noteId: responseData[i]["id"]
}), })
headers: {
"Content-Type": "application/json; charset=UTF-8"
}
}) })
.then((response) => response) .then((response) => response)
.then((response) => { .then((response) => {
@ -504,10 +480,7 @@ newNote.addEventListener("click", (event) => {
body: JSON.stringify({ body: JSON.stringify({
secretKey: secretkey, secretKey: secretkey,
noteName: encryptedName, noteName: encryptedName,
}), })
headers: {
"Content-Type": "application/json; charset=UTF-8"
}
}) })
.catch((error) => { .catch((error) => {
displayError("Failed to create new note, please try again later...") displayError("Failed to create new note, please try again later...")
@ -539,10 +512,7 @@ function exportNotes() {
method: "POST", method: "POST",
body: JSON.stringify({ body: JSON.stringify({
secretKey: secretkey secretKey: secretkey
}), })
headers: {
"Content-Type": "application/json; charset=UTF-8"
}
}) })
.then((response) => response) .then((response) => response)
.then((response) => { .then((response) => {
@ -599,10 +569,7 @@ removeBox.addEventListener("click", (event) => {
body: JSON.stringify({ body: JSON.stringify({
secretKey: secretkey, secretKey: secretkey,
noteId: selectedNote noteId: selectedNote
}), })
headers: {
"Content-Type": "application/json; charset=UTF-8"
}
}) })
.then((response) => response) .then((response) => response)
.then((response) => { .then((response) => {

View File

@ -66,10 +66,7 @@ signupButton.addEventListener("click", (event) => {
body: JSON.stringify({ body: JSON.stringify({
username: username, username: username,
password: await hashpass(password) password: await hashpass(password)
}), })
headers: {
"Content-Type": "application/json; charset=UTF-8"
}
}) })
.then((response) => response) .then((response) => response)
.then((response) => { .then((response) => {