Update crates to latest version.
This commit is contained in:
1495
Cargo.lock
generated
1495
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
24
Cargo.toml
24
Cargo.toml
@@ -7,23 +7,23 @@ edition = "2018"
|
|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
mongodb = "0.9.0"
|
mongodb = "0.9.2"
|
||||||
bson = "0.14.0"
|
bson = "0.14.1"
|
||||||
rocket = { version = "0.4.2", default-features = false }
|
rocket = { version = "0.4.4", default-features = false }
|
||||||
once_cell = "1.3.1"
|
once_cell = "1.3.1"
|
||||||
dotenv = "0.15.0"
|
dotenv = "0.15.0"
|
||||||
ulid = "0.3.1"
|
ulid = "0.3.1"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
rocket_contrib = "0.4.2"
|
rocket_contrib = "0.4.4"
|
||||||
validator = "0.10.0"
|
validator = "0.10.0"
|
||||||
bcrypt = "0.6.1"
|
bcrypt = "0.7.0"
|
||||||
chrono = "0.4.10"
|
chrono = "0.4.11"
|
||||||
rand = "0.7.3"
|
rand = "0.7.3"
|
||||||
time = "0.2.4"
|
time = "0.2.9"
|
||||||
reqwest = { version = "0.10.1", features = ["blocking", "json"] }
|
reqwest = { version = "0.10.4", features = ["blocking", "json"] }
|
||||||
num_enum = "0.4.2"
|
num_enum = "0.4.3"
|
||||||
ws = "0.9.1"
|
ws = "0.9.1"
|
||||||
hashbrown = "0.7.0"
|
hashbrown = "0.7.1"
|
||||||
serde_json = "1.0.47"
|
serde_json = "1.0.51"
|
||||||
rocket_cors = "0.5.1"
|
rocket_cors = "0.5.2"
|
||||||
bitfield = "0.13.2"
|
bitfield = "0.13.2"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use bson::{bson, doc};
|
use bson::doc;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use super::get_collection;
|
use super::get_collection;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use super::get_collection;
|
use super::get_collection;
|
||||||
|
|
||||||
use bson::{bson, doc};
|
use bson::doc;
|
||||||
use mongodb::options::FindOneOptions;
|
use mongodb::options::FindOneOptions;
|
||||||
|
|
||||||
/*pub struct MutualGuild {
|
/*pub struct MutualGuild {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use crate::guards::auth::UserRef;
|
|||||||
use crate::guards::channel::ChannelRef;
|
use crate::guards::channel::ChannelRef;
|
||||||
use crate::guards::guild::GuildRef;
|
use crate::guards::guild::GuildRef;
|
||||||
|
|
||||||
use bson::{bson, doc};
|
use bson::doc;
|
||||||
use num_enum::TryFromPrimitive;
|
use num_enum::TryFromPrimitive;
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Eq, TryFromPrimitive)]
|
#[derive(Debug, PartialEq, Eq, TryFromPrimitive)]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use bson::{bson, doc, from_bson, Document};
|
use bson::{doc, from_bson, Document};
|
||||||
use mongodb::options::FindOneOptions;
|
use mongodb::options::FindOneOptions;
|
||||||
use rocket::http::{RawStr, Status};
|
use rocket::http::{RawStr, Status};
|
||||||
use rocket::request::{self, FromParam, FromRequest, Request};
|
use rocket::request::{self, FromParam, FromRequest, Request};
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use bson::{bson, doc, from_bson, Document};
|
use bson::{doc, from_bson, Document};
|
||||||
use mongodb::options::FindOneOptions;
|
use mongodb::options::FindOneOptions;
|
||||||
use rocket::http::RawStr;
|
use rocket::http::RawStr;
|
||||||
use rocket::request::FromParam;
|
use rocket::request::FromParam;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use bson::{bson, doc, from_bson, Document};
|
use bson::{doc, from_bson, Document};
|
||||||
use mongodb::options::FindOneOptions;
|
use mongodb::options::FindOneOptions;
|
||||||
use rocket::http::RawStr;
|
use rocket::http::RawStr;
|
||||||
use rocket::request::FromParam;
|
use rocket::request::FromParam;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ use crate::database;
|
|||||||
use crate::email;
|
use crate::email;
|
||||||
|
|
||||||
use bcrypt::{hash, verify};
|
use bcrypt::{hash, verify};
|
||||||
use bson::{bson, doc, from_bson, Bson::UtcDatetime};
|
use bson::{doc, from_bson, Bson::UtcDatetime};
|
||||||
use chrono::prelude::*;
|
use chrono::prelude::*;
|
||||||
use database::user::User;
|
use database::user::User;
|
||||||
use rand::{distributions::Alphanumeric, Rng};
|
use rand::{distributions::Alphanumeric, Rng};
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use crate::database::{
|
|||||||
use crate::guards::auth::UserRef;
|
use crate::guards::auth::UserRef;
|
||||||
use crate::guards::channel::ChannelRef;
|
use crate::guards::channel::ChannelRef;
|
||||||
|
|
||||||
use bson::{bson, doc, from_bson, Bson, Bson::UtcDatetime};
|
use bson::{doc, from_bson, Bson, Bson::UtcDatetime};
|
||||||
use chrono::prelude::*;
|
use chrono::prelude::*;
|
||||||
use hashbrown::HashSet;
|
use hashbrown::HashSet;
|
||||||
use num_enum::TryFromPrimitive;
|
use num_enum::TryFromPrimitive;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use crate::database::{
|
|||||||
};
|
};
|
||||||
use crate::guards::auth::UserRef;
|
use crate::guards::auth::UserRef;
|
||||||
|
|
||||||
use bson::{bson, doc, from_bson, Bson};
|
use bson::{doc, from_bson, Bson};
|
||||||
use rocket_contrib::json::Json;
|
use rocket_contrib::json::Json;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use ulid::Ulid;
|
use ulid::Ulid;
|
||||||
@@ -125,15 +125,18 @@ pub fn create_guild(user: UserRef, info: Json<CreateGuild>) -> Response {
|
|||||||
|
|
||||||
let id = Ulid::new().to_string();
|
let id = Ulid::new().to_string();
|
||||||
let channel_id = Ulid::new().to_string();
|
let channel_id = Ulid::new().to_string();
|
||||||
if channels.insert_one(
|
if channels
|
||||||
doc! {
|
.insert_one(
|
||||||
"_id": channel_id.clone(),
|
doc! {
|
||||||
"type": ChannelType::GUILDCHANNEL as u32,
|
"_id": channel_id.clone(),
|
||||||
"name": "general",
|
"type": ChannelType::GUILDCHANNEL as u32,
|
||||||
"guild": id.clone(),
|
"name": "general",
|
||||||
},
|
"guild": id.clone(),
|
||||||
None,
|
},
|
||||||
).is_err() {
|
None,
|
||||||
|
)
|
||||||
|
.is_err()
|
||||||
|
{
|
||||||
return Response::InternalServerError(
|
return Response::InternalServerError(
|
||||||
json!({ "error": "Failed to create guild channel." }),
|
json!({ "error": "Failed to create guild channel." }),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use crate::database::{get_relationship, get_relationship_internal, Relationship}
|
|||||||
use crate::guards::auth::UserRef;
|
use crate::guards::auth::UserRef;
|
||||||
use crate::routes::channel;
|
use crate::routes::channel;
|
||||||
|
|
||||||
use bson::{bson, doc, from_bson};
|
use bson::{doc, from_bson};
|
||||||
use mongodb::options::FindOptions;
|
use mongodb::options::FindOptions;
|
||||||
use rocket_contrib::json::Json;
|
use rocket_contrib::json::Json;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use hashbrown::HashMap;
|
|||||||
use std::sync::RwLock;
|
use std::sync::RwLock;
|
||||||
use ulid::Ulid;
|
use ulid::Ulid;
|
||||||
|
|
||||||
use bson::{bson, doc};
|
use bson::doc;
|
||||||
use serde_json::{from_str, json, Value};
|
use serde_json::{from_str, json, Value};
|
||||||
|
|
||||||
use ws::{listen, CloseCode, Error, Handler, Handshake, Message, Result, Sender};
|
use ws::{listen, CloseCode, Error, Handler, Handshake, Message, Result, Sender};
|
||||||
|
|||||||
Reference in New Issue
Block a user