test: follow_already, unfollow_non, ban_already, ban_nonban, delete_non, create_already, search non

feat:  database status in alive json
This commit is contained in:
Ahmet Kaan GÜMÜŞ 2024-04-04 06:23:15 +03:00
parent 4dcafc8e3b
commit 66cc09a323
5 changed files with 167 additions and 37 deletions

View file

@ -9,7 +9,10 @@ pub async fn connect() -> Option<Surreal<Client>> {
}
pub async fn create(username: &String, db: &Surreal<Client>) -> Option<Channel> {
create_channel(username, db).await.pop().unwrap()
match create_channel(username, db).await.pop() {
Some(channel) => channel,
None => None,
}
}
pub async fn search(username: &String, db: &Surreal<Client>) -> Option<Channel> {