mirror of
https://github.com/Steffo99/todocolors.git
synced 2024-11-22 08:14:18 +00:00
Rename ServerOperation
to BoardOperation
This commit is contained in:
parent
f3ae182d67
commit
93a0dc65b6
1 changed files with 5 additions and 5 deletions
|
@ -13,7 +13,7 @@ pub enum ClientOperation {
|
||||||
|
|
||||||
/// An operation sent from the server to the clients, and stored on the database.
|
/// An operation sent from the server to the clients, and stored on the database.
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
pub enum ServerOperation {
|
pub enum BoardOperation {
|
||||||
/// Set the board's title.
|
/// Set the board's title.
|
||||||
Title(String),
|
Title(String),
|
||||||
/// Create, update, or delete the [`Task`] with the given [`Uuid`].
|
/// Create, update, or delete the [`Task`] with the given [`Uuid`].
|
||||||
|
@ -26,13 +26,13 @@ impl ClientOperation {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ServerOperation {
|
impl BoardOperation {
|
||||||
fn store(&self, rconn: redis::aio::Connection, board: &str) -> Result<()> {
|
fn store(&self, rconn: redis::aio::Connection, board: &str) -> Result<()> {
|
||||||
log::debug!("Storing ServerOperation in Redis: {:?}", &self);
|
log::debug!("Storing BoardOperation in Redis: {:?}", &self);
|
||||||
|
|
||||||
log::trace!("Serializing ServerOperation to JSON...");
|
log::trace!("Serializing BoardOperation to JSON...");
|
||||||
let data = serde_json::ser::to_string(self)
|
let data = serde_json::ser::to_string(self)
|
||||||
.expect_or_500_and_log("Failed to serialize ServerOperation");
|
.expect_or_500_and_log("Failed to serialize BoardOperation");
|
||||||
|
|
||||||
log::trace!("Computing Redis key...");
|
log::trace!("Computing Redis key...");
|
||||||
let stream_key = format!("board:{{{board}}}:stream");
|
let stream_key = format!("board:{{{board}}}:stream");
|
||||||
|
|
Loading…
Reference in a new issue