forge
Explore
Log in

Don't you dare go Hollow

Search community by name

Browse files at this commit

aa1a10f75b393c0539dab1c4f04dd48a7196ba0dAhmet Kaan GümüşParent: e86062e
  • feat
    • search community by name
Show full message
✨ feat(server): search community by name
crates/server/src/request.rsmodified+11 -0
@@ -230,6 +230,17 @@ pub async fn handle_request(
230230 .collect(),
231231 ))
232232 }
233+ Request::SearchCommunity(search_community) => {
234+ let communities = Community::read_by_name(
235+ search_community.get_community_name(),
236+ database_connection,
237+ )
238+ .await?;
239+
240+ Ok(Response::SearchCommunity(
241+ communities.into_iter().map(Into::into).collect(),
242+ ))
243+ }
233244 }
234245 };
235246