mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 13:36:59 +00:00
Start moving to Rocket 0.5.0
This commit is contained in:
@@ -9,7 +9,7 @@ use mongodb::{
|
||||
bson::{doc, to_document, Document},
|
||||
options::FindOptions,
|
||||
};
|
||||
use rocket_contrib::json::JsonValue;
|
||||
use rocket::serde::json::Value;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||
@@ -139,7 +139,7 @@ impl Channel {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn publish_update(&self, data: JsonValue) -> Result<()> {
|
||||
pub async fn publish_update(&self, data: Value) -> Result<()> {
|
||||
let id = self.id().to_string();
|
||||
ClientboundNotification::ChannelUpdate {
|
||||
id: id.clone(),
|
||||
|
||||
@@ -11,7 +11,7 @@ use mongodb::{
|
||||
bson::{doc, to_bson, DateTime},
|
||||
options::FindOptions,
|
||||
};
|
||||
use rocket_contrib::json::JsonValue;
|
||||
use rocket::serde::json::Value;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use ulid::Ulid;
|
||||
use web_push::{
|
||||
@@ -323,7 +323,7 @@ impl Message {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn publish_update(self, data: JsonValue) -> Result<()> {
|
||||
pub async fn publish_update(self, data: Value) -> Result<()> {
|
||||
let channel = self.channel.clone();
|
||||
ClientboundNotification::MessageUpdate {
|
||||
id: self.id.clone(),
|
||||
|
||||
@@ -8,7 +8,7 @@ use mongodb::bson::{Bson, doc};
|
||||
use mongodb::bson::from_document;
|
||||
use mongodb::bson::to_document;
|
||||
use mongodb::bson::Document;
|
||||
use rocket_contrib::json::JsonValue;
|
||||
use rocket::serde::json::Value;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||
@@ -120,7 +120,7 @@ impl Server {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn publish_update(&self, data: JsonValue) -> Result<()> {
|
||||
pub async fn publish_update(&self, data: Value) -> Result<()> {
|
||||
ClientboundNotification::ServerUpdate {
|
||||
id: self.id.clone(),
|
||||
data,
|
||||
|
||||
Reference in New Issue
Block a user