Remove obsolete code from Store

This commit is contained in:
Antonio Scandurra 2022-11-17 18:46:39 +01:00
parent 0a4517f97e
commit 6c83be3f89
4 changed files with 58 additions and 275 deletions

View file

@ -1464,6 +1464,21 @@ where
// projects
pub async fn project_count_excluding_admins(&self) -> Result<usize> {
self.transact(|mut tx| async move {
Ok(sqlx::query_scalar::<_, i32>(
"
SELECT COUNT(*)
FROM projects, users
WHERE projects.host_user_id = users.id AND users.admin IS FALSE
",
)
.fetch_one(&mut tx)
.await? as usize)
})
.await
}
pub async fn share_project(
&self,
expected_room_id: RoomId,