aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2024-10-10 12:56:49 +0800
committerGitHub <noreply@github.com>2024-10-10 04:56:49 +0000
commitc2217670dd7514e17fc9c1f17d7e459b842ea798 (patch)
tree01042a8c4ff3d5352cb028b70b78eddf4f0d7814 /web_src/js
parentdd83cfcacc989d0e7cbd21ec5eba029fdfcb72dd (diff)
downloadgitea-c2217670dd7514e17fc9c1f17d7e459b842ea798.tar.gz
gitea-c2217670dd7514e17fc9c1f17d7e459b842ea798.zip
Move admin routers from /admin to /-/admin (#32189)
Resolve #32181 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'web_src/js')
-rw-r--r--web_src/js/features/admin/config.ts2
-rw-r--r--web_src/js/features/admin/selfcheck.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/web_src/js/features/admin/config.ts b/web_src/js/features/admin/config.ts
index 4ccbbacd5b..0d130703ae 100644
--- a/web_src/js/features/admin/config.ts
+++ b/web_src/js/features/admin/config.ts
@@ -10,7 +10,7 @@ export function initAdminConfigs() {
for (const el of elAdminConfig.querySelectorAll('input[type="checkbox"][data-config-dyn-key]')) {
el.addEventListener('change', async () => {
try {
- const resp = await POST(`${appSubUrl}/admin/config`, {
+ const resp = await POST(`${appSubUrl}/-/admin/config`, {
data: new URLSearchParams({key: el.getAttribute('data-config-dyn-key'), value: el.checked}),
});
const json = await resp.json();
diff --git a/web_src/js/features/admin/selfcheck.ts b/web_src/js/features/admin/selfcheck.ts
index 498c52ffb5..925a50130f 100644
--- a/web_src/js/features/admin/selfcheck.ts
+++ b/web_src/js/features/admin/selfcheck.ts
@@ -10,7 +10,7 @@ export async function initAdminSelfCheck() {
const elContent = document.querySelector('.page-content.admin .admin-setting-content');
// send frontend self-check request
- const resp = await POST(`${appSubUrl}/admin/self_check`, {
+ const resp = await POST(`${appSubUrl}/-/admin/self_check`, {
data: new URLSearchParams({
location_origin: window.location.origin,
now: Date.now(), // TODO: check time difference between server and client