Handle admin deletions

This commit is contained in:
Tony Klink 2024-01-26 15:53:19 -06:00
parent d15bf891db
commit 1a03719473
Signed by: klink
GPG key ID: 85175567C4D19231
2 changed files with 5 additions and 1 deletions

View file

@ -51,7 +51,7 @@
];
env = {
DATABASE_URL = "/tmp/sqlite.db";
ADMIN_PUBKEY = "npub14d2a54za7dnfzktle40vw7kdx48vk3ljy3t7w7sdpk3segea65mq2t6kc4";
ADMIN_PUBKEY = "npub1m2w0ckmkgj4wtvl8muwjynh56j3qd4nddca4exdg4mdrkepvfnhsmusy54";
RUST_BACKTRACE = 1;
};
};

View file

@ -1266,6 +1266,10 @@ impl Noose for NostrSqlite {
Err(e) => Command::ServiceError(e),
}
}
Command::DbReqDeleteEvents(client_id, event) => match self.admin_delete_events(&event).await {
Ok(status) => Command::DbResOkWithStatus(client_id, status),
Err(e) => Command::ServiceError(e),
}
Command::DbReqEventCounts(client_id, subscriptioin) => {
match self.counts(subscriptioin).await {
Ok(relay_message) => Command::DbResEventCounts(client_id, relay_message),