diff options
| author | Santo Cariotti <santo@dcariotti.me> | 2022-09-12 13:30:19 +0000 |
|---|---|---|
| committer | Santo Cariotti <santo@dcariotti.me> | 2022-09-12 13:30:19 +0000 |
| commit | af3f5430a0b0f1834228b28fd89848959512e718 (patch) | |
| tree | 27e843c147b92bf09893012f323ddaf54f5eb0a5 /src/models/user.rs | |
| parent | 385102a5763f667d53a9d8ed2052ccb8c791bc91 (diff) | |
Use configuration for environment variables
Diffstat (limited to 'src/models/user.rs')
| -rw-r--r-- | src/models/user.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/models/user.rs b/src/models/user.rs index 22bd130..55abc97 100644 --- a/src/models/user.rs +++ b/src/models/user.rs @@ -1,4 +1,4 @@ -use crate::config::PAGE_LIMIT; +use crate::config::CONFIG; use crate::db::get_client; use crate::errors::AppError; @@ -121,8 +121,8 @@ impl User { r#"SELECT id, email, username, is_staff FROM users LIMIT $1 OFFSET $2 "#, - PAGE_LIMIT, - PAGE_LIMIT * page + CONFIG.page_limit, + CONFIG.page_limit * page ) .fetch_all(pool) .await?; |
