Adding paged loading of links.

This commit is contained in:
2021-08-12 15:48:02 +02:00
committed by dietrich
parent 2b276a5130
commit b11177a943
12 changed files with 156 additions and 21 deletions
+1 -1
View File
@@ -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,
};
+1
View File
@@ -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)