Skip to content

Commit b27ff84

Browse files
authored
replace typed out URL with BASE_URL constant
bad typo is bad
1 parent 5374a9b commit b27ff84

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)