Skip to content

Commit 3216cb1

Browse files
committed
GET user
1 parent 4918c91 commit 3216cb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ type EndpointResult<T> = Result<T, ServerError>;
4949

5050
#[get("/users/<username>")]
5151
fn get_user(db: State<Database>, username: String) -> EndpointResult<Json<User>> {
52-
todo!()
52+
Ok(Json(db.users.get(username.as_bytes())??))
5353
}
5454

5555
#[delete("/users/<username>")]

0 commit comments

Comments
 (0)