mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
Showing error messages if trying to delete other users stuff
This commit is contained in:
parent
6a2c22f24a
commit
4c4fb1dacc
2 changed files with 16 additions and 5 deletions
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"siteUrl": "https://qmining.frylabs.net/",
|
||||
"apiUrl": "https://api.frylabs.net/",
|
||||
"devApiUrl": "http://localhost:8080/",
|
||||
"mobileWindowWidth": 700,
|
||||
"maxQuestionsToRender": 250
|
||||
}
|
||||
|
|
|
@ -150,7 +150,11 @@ export default function Index({ globalData }) {
|
|||
return res.json()
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.status === 'fail') {
|
||||
alert(res.msg)
|
||||
} else {
|
||||
setNews(res.news)
|
||||
}
|
||||
})
|
||||
}}
|
||||
onNewsReact={({ reaction, isDelete }) => {
|
||||
|
@ -216,7 +220,11 @@ export default function Index({ globalData }) {
|
|||
return res.json()
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.status === 'fail') {
|
||||
alert(res.msg)
|
||||
} else {
|
||||
setNews(res.news)
|
||||
}
|
||||
})
|
||||
}}
|
||||
onComment={(path, content) => {
|
||||
|
@ -262,9 +270,11 @@ export default function Index({ globalData }) {
|
|||
}
|
||||
console.log(type, title, content, file)
|
||||
if (type === 'private') {
|
||||
postFeedback(content, file).then((/* { fileres, textres } */) => {
|
||||
postFeedback(content, file).then(
|
||||
(/* { fileres, textres } */) => {
|
||||
alert('Privát visszajelzés elküldve!')
|
||||
})
|
||||
}
|
||||
)
|
||||
} else {
|
||||
if (!title) {
|
||||
alert('Üres a téma!')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue