update metadata system for usenet

- probably have to wipe existing groups
This commit is contained in:
zefie
2022-10-14 01:03:33 -04:00
parent a6659b4b16
commit c6bb1a6fee
3 changed files with 75 additions and 50 deletions

View File

@@ -99,7 +99,6 @@ class WTVNews {
listGroups(search = null) {
// list of groups on the server
return new Promise((resolve, reject) => {
if (search === "*") search = null;
if (!search) {
this.client.list().then((data) => {
console.log('listGroups data', data)
@@ -109,11 +108,10 @@ class WTVNews {
reject(e);
});
} else {
this.client.listNewsgroups('*' + search + '*').then((data) => {
console.log('listGroups data', data)
this.client.listNewsgroups((search === '*') ? '*' : '*' + search + '*').then((data) => {
resolve(this.processGroupList(data));
}).catch((e) => {
console.error(" * WTVNews Error:", "Command: listGroups (all)", e);
console.error(" * WTVNews Error:", "Command: listGroups (search)", search, e);
reject(e);
});
}