infoserv: type the news kind as an enum at the store boundary
All checks were successful
CI / check (push) Successful in 3m53s

This commit is contained in:
Jean Chevronnet 2026-07-17 13:53:53 +00:00
parent ee95225eaf
commit 7a5f1502a4
No known key found for this signature in database
11 changed files with 49 additions and 31 deletions

View file

@ -9,7 +9,7 @@
//! and any operator may OLIST. `lib.rs` holds the dispatcher; each command
//! (parameterised by bulletin kind) lives in its own file.
use echo_api::{HelpEntry, NetView, Sender, Service, ServiceCtx, Store};
use echo_api::{HelpEntry, NetView, NewsKind, Sender, Service, ServiceCtx, Store};
#[path = "post.rs"]
mod post;
@ -19,8 +19,8 @@ mod del;
mod list;
// The two bulletin kinds in the shared news store.
const PUBLIC: &str = "logon";
const OPER: &str = "oper";
const PUBLIC: NewsKind = NewsKind::Logon;
const OPER: NewsKind = NewsKind::Oper;
const BLURB: &str = "InfoServ holds the network's information bulletins: public ones show on connect, oper ones on login.";