Adding paged loading of links.
This commit is contained in:
@@ -131,7 +131,7 @@ impl UserDbOperations<Self> for User {
|
||||
#[instrument()]
|
||||
async fn toggle_admin(self, server_config: &ServerConfig) -> Result<(), ServerError> {
|
||||
let new_role = match self.role {
|
||||
r @ Role::NotAuthenticated | r @ Role::Disabled => r,
|
||||
r @ (Role::NotAuthenticated | Role::Disabled) => r,
|
||||
Role::Regular => Role::Admin,
|
||||
Role::Admin => Role::Regular,
|
||||
};
|
||||
|
||||
@@ -113,6 +113,7 @@ pub async fn list_all_allowed(
|
||||
querystring.push_str(&generate_order_sql(&order));
|
||||
}
|
||||
querystring.push_str(&format!("\n LIMIT {}", parameters.amount));
|
||||
querystring.push_str(&format!("\n OFFSET {}", parameters.offset));
|
||||
info!("{}", querystring);
|
||||
|
||||
let links = sqlx::query(&querystring)
|
||||
|
||||
Reference in New Issue
Block a user