Reports: Modified the route

This commit is contained in:
Ilya Prokopenko 2022-01-10 19:09:54 +03:00
parent 67c701f6f9
commit 35b70268a8
No known key found for this signature in database
GPG key ID: 7736BBBB05F14A56
2 changed files with 2 additions and 2 deletions

View file

@ -46,7 +46,7 @@
(function() { (function() {
res = document.querySelector("#uReportMsgInput").value; res = document.querySelector("#uReportMsgInput").value;
xhr = new XMLHttpRequest(); xhr = new XMLHttpRequest();
xhr.open("GET", "/report.pl/" + {$post->getId()} + "?reason=" + res + "&type=post", true); xhr.open("GET", "/report/" + {$post->getId()} + "?reason=" + res + "&type=post", true);
xhr.onload = (function() { xhr.onload = (function() {
if(xhr.responseText.indexOf("reason") === -1) if(xhr.responseText.indexOf("reason") === -1)
MessageBox("Ошибка", "Не удалось подать жалобу...", ["OK"], [Function.noop]); MessageBox("Ошибка", "Не удалось подать жалобу...", ["OK"], [Function.noop]);

View file

@ -265,7 +265,7 @@ routes:
handler: "Report->view" handler: "Report->view"
- url: "/admin/reportAction{num}" - url: "/admin/reportAction{num}"
handler: "Report->action" handler: "Report->action"
- url: "/report.pl/{num}" - url: "/report/{num}"
handler: "Report->create" handler: "Report->create"
- url: "/method/{text}.{text}" - url: "/method/{text}.{text}"
handler: "VKAPI->route" handler: "VKAPI->route"