fix deelevation of connection, update client

This commit is contained in:
2026-04-19 22:19:23 +02:00
parent b8b1b4a0bc
commit c7da6a3b4f
3 changed files with 13 additions and 4 deletions
+10 -2
View File
@@ -74,6 +74,7 @@
<button data-form="mod-user-avatar" onclick="showForm('mod-user-avatar')">POST /mod/user/avatar</button>
<button data-form="mod-user-profilebg" onclick="showForm('mod-user-profilebg')">POST /mod/user/profilebg</button>
<button data-form="mod-connection-elevate" onclick="showForm('mod-connection-elevate')">POST /mod/connection/elevate</button>
<button data-form="mod-connection-deelevate" onclick="showForm('mod-connection-deelevate')">POST /mod/connection/deelevate</button>
<button data-form="get-user" onclick="showForm('get-user')">POST /get/user</button>
<button data-form="get-connections" onclick="showForm('get-connections')">POST /get/connections</button>
<button data-form="get-connection-messages" onclick="showForm('get-connection-messages')">POST /get/connection/messages</button>
@@ -107,9 +108,8 @@
fields: [
{ id: 'nu-username', label: 'username', ph: 'min 4 chars' },
{ id: 'nu-password', label: 'password', ph: 'min 8 chars' },
{ id: 'nu-color', label: 'color', ph: '255,100,50', hint: 'R,G,B' },
],
submit: () => httpPost('/new/user', { username:'nu-username', password:'nu-password', color:'nu-color' })
submit: () => httpPost('/new/user', { username:'nu-username', password:'nu-password' })
},
'new-token': {
title: 'POST /new/token — login / get token',
@@ -165,6 +165,14 @@
],
submit: () => httpPost('/mod/connection/elevate', { token:'mce-token', connectionid:'mce-connectionid' })
},
'mod-connection-deelevate': {
title: 'POST /mod/connection/deelevate — de-elevate connection',
fields: [
{ id: 'mcde-token', label: 'token', ph: '' },
{ id: 'mcde-connectionid', label: 'connectionid', ph: 'UUID' },
],
submit: () => httpPost('/mod/connection/deelevate', { token:'mcde-token', connectionid:'mcde-connectionid' })
},
'get-user': {
title: 'POST /get/user — get user info',
fields: [