Merge pull request #31 from alamin655/page_url
Fix page_url assignment in search route
This commit is contained in:
commit
5f052dbee8
1 changed files with 6 additions and 7 deletions
|
@ -81,11 +81,10 @@ pub async fn search(
|
|||
.insert_header(("location", "/"))
|
||||
.finish())
|
||||
} else {
|
||||
// Initialize the page url as an empty string
|
||||
let mut page_url = String::new();
|
||||
let page_url: String; // Declare the page_url variable without initializing it
|
||||
|
||||
// ...
|
||||
|
||||
// Find whether the page is valid page number if not then return
|
||||
// the first page number and also construct the page_url accordingly
|
||||
let page = match params.page {
|
||||
Some(page_number) => {
|
||||
if page_number <= 1 {
|
||||
|
|
Loading…
Add table
Reference in a new issue