forked from asklyphe-public/asklyphe
Fix docker compose & the authservice admin_count
function
This commit is contained in:
parent
1370bc8a43
commit
3ed54bf7e8
2 changed files with 2 additions and 2 deletions
|
@ -458,7 +458,7 @@ pub async fn user_count(db: &DatabaseConnection) -> Result<usize, FetchUserError
|
|||
pub async fn admin_count(db: &DatabaseConnection) -> Result<usize, FetchUserError> {
|
||||
// dont fucking touch this, i don't know why it works but it does, it's actually evil
|
||||
// note: doesn't work
|
||||
Ok(user::Entity::find().filter(user::Column::Flags.into_expr().binary(BinOper::LShift, Expr::value(63 - 2)).lt(1 << (63 - 2)))
|
||||
Ok(user::Entity::find().filter(user::Column::Flags.into_expr().binary(BinOper::BitAnd, UserFlag::Administrator as i64).binary(BinOper::NotEqual, 0))
|
||||
.count(db).await.map_err(|e| {
|
||||
error!("DATABASE ERROR WHILE ADMINCOUNT: {e}");
|
||||
FetchUserError::DatabaseError
|
||||
|
|
|
@ -77,7 +77,7 @@ services:
|
|||
- db
|
||||
env_file: ".env"
|
||||
image: nats:2.11.8
|
||||
cmd: "nats-server -js"
|
||||
command: "-js"
|
||||
db:
|
||||
image: postgres:17
|
||||
networks:
|
||||
|
|
Loading…
Add table
Reference in a new issue