From 4361f48b98fc07c6abf14ecfe54953929fe38130 Mon Sep 17 00:00:00 2001 From: Felix Date: Sat, 11 Jan 2020 13:30:45 +0100 Subject: Make various functions async --- server/src/apub/community.rs | 4 ++-- server/src/apub/user.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'server/src/apub') diff --git a/server/src/apub/community.rs b/server/src/apub/community.rs index 504e1790..fac6088e 100644 --- a/server/src/apub/community.rs +++ b/server/src/apub/community.rs @@ -84,7 +84,7 @@ pub struct CommunityQuery { community_name: String, } -pub fn get_apub_community(info: Path) -> HttpResponse { +pub async fn get_apub_community(info: Path) -> HttpResponse { let connection = establish_connection(); if let Ok(community) = Community::read_from_name(&connection, info.community_name.to_owned()) { @@ -96,7 +96,7 @@ pub fn get_apub_community(info: Path) -> HttpResponse { } } -pub fn get_apub_community_followers(info: Path) -> HttpResponse { +pub async fn get_apub_community_followers(info: Path) -> HttpResponse { let connection = establish_connection(); if let Ok(community) = Community::read_from_name(&connection, info.community_name.to_owned()) { diff --git a/server/src/apub/user.rs b/server/src/apub/user.rs index 9de2c36c..cf9a9797 100644 --- a/server/src/apub/user.rs +++ b/server/src/apub/user.rs @@ -61,7 +61,7 @@ pub struct UserQuery { user_name: String, } -pub fn get_apub_user(info: Path) -> HttpResponse { +pub async fn get_apub_user(info: Path) -> HttpResponse { let connection = establish_connection(); if let Ok(user) = User_::find_by_email_or_username(&connection, &info.user_name) { -- cgit v1.2.3