remove useless feature

This commit is contained in:
maaa 2023-10-20 18:46:00 +02:00
parent df9d21da58
commit 72e5a8b41f
3 changed files with 0 additions and 41 deletions

12
main
View File

@ -439,18 +439,6 @@ def apisessionsremove():
return {}, 422 return {}, 422
@app.route("/api/submitfeedback", methods=("GET", "POST"))
def apisubmitfeedback():
if request.method == "POST":
data = request.get_json()
secretKey = data["secretKey"]
feedback = data["feedback"]
print("feedback: " + feedback)
return {}, 200
@app.route("/listusers/<secretkey>", methods=("GET", "POST")) @app.route("/listusers/<secretkey>", methods=("GET", "POST"))
def listusers(secretkey): def listusers(secretkey):
if secretkey == SECRET_KEY: if secretkey == SECRET_KEY:

View File

@ -588,34 +588,6 @@ exportNotesButton.addEventListener("click", (event) => {
exportNotes() exportNotes()
}); });
sendFeedbackButton.addEventListener("click", (event) => {
let noteName = displayPrompt("Feedback:", "Write your feedback here. Don't include personal info.", burgerFunction)
function burgerFunction(feedbackText) {
if (feedbackText != null) {
fetch("/api/submitfeedback", {
method: "POST",
body: JSON.stringify({
secretKey: secretkey,
feedback: feedbackText
}),
headers: {
"Content-type": "application/json; charset=UTF-8"
}
})
.catch((error) => {
displayError("failed to submit feedback, please try again later")
})
.then((response) => {
if (response.status == 200) {
displayError("Thank you for submitting feedback!")
} else {
displayError("failed to submit feedback (HTTP error code " + response.status + ")")
}
});
};
}
});
removeBox.addEventListener("click", (event) => { removeBox.addEventListener("click", (event) => {
if (selectedNote == 0) { if (selectedNote == 0) {
displayError("you need to select a note first!") displayError("you need to select a note first!")

View File

@ -24,7 +24,6 @@
<button id="textMinusBox" class="right">-</button> <button id="textMinusBox" class="right">-</button>
<button id="textSizeBox" class="right">16px</button> <button id="textSizeBox" class="right">16px</button>
<button id="textPlusBox" class="right">+</button> <button id="textPlusBox" class="right">+</button>
<button id="sendFeedbackButton" class="right">Send feedback</button>
</div> </div>
<div id="notesBar" class="notesBar"> <div id="notesBar" class="notesBar">