Skip to content

Commit 332fc55

Browse files
authored
Merge pull request #1 from GottZ/patch-1
replace typed out URL with BASE_URL constant
2 parents 5374a9b + b27ff84 commit 332fc55

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

todo_web/src/todo_api.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub async fn toggle_task(id: String) -> Result<AffectedRows, Error> {
3131
}
3232

3333
pub async fn delete_task(id: String) -> Result<AffectedRows, Error> {
34-
Request::delete(&format!("http://localhost:8080/task/{id}"))
34+
Request::delete(&format!("{BASE_URL}/task/{id}"))
3535
.send()
3636
.await
3737
.unwrap()

0 commit comments

Comments
 (0)