Archived
1
0

add pubkey.* admin functions

This commit is contained in:
jeff 2015-10-02 11:00:26 -04:00
parent 2366781282
commit 441be15845
2 changed files with 29 additions and 0 deletions

View File

@ -47,6 +47,23 @@ function get_board_target() {
return e.value; return e.value;
} }
function get_key_target() {
var e = document.getElementById("nntpchan_key_target");
return e.value;
}
function nntpchan_key_del() {
nntpchan_admin("pubkey.del", {
pubkey: get_key_target()
});
}
function nntpchan_key_add() {
nntpchan_admin("pubkey.add", {
pubkey: get_key_target()
});
}
function nntpchan_admin_board(method) { function nntpchan_admin_board(method) {
nntpchan_admin(method, { nntpchan_admin(method, {
newsgroup: get_board_target() newsgroup: get_board_target()

View File

@ -26,6 +26,18 @@
</div> </div>
</div> </div>
<hr /> <hr />
<div>
<div> key actions </div>
<div>
<label for="nntpchan_board_target">pubkey:</label>
<input type="text" id="nntpchan_key_target" />
</div>
<div>
<button onclick="nntpchan_key_add()">add key</button>
<button onclick="nntpchan_key_del()">remove key</button>
</div>
</div>
<hr />
<div> <div>
<div> board actions </div> <div> board actions </div>
<div> <div>