Add a few dummy endpoints to make riot progress further
This commit is contained in:
parent
ddcd423e6f
commit
215a31c513
2 changed files with 63 additions and 12 deletions
|
@ -63,7 +63,7 @@ where
|
|||
let token = match request
|
||||
.headers()
|
||||
.get_one("Authorization")
|
||||
.map(|s| s.to_owned())
|
||||
.map(|s| s[7..].to_owned()) // Split off "Bearer "
|
||||
.or_else(|| request.get_query_value("access_token").and_then(|r| r.ok()))
|
||||
{
|
||||
// TODO: M_MISSING_TOKEN
|
||||
|
@ -95,7 +95,7 @@ where
|
|||
let http_request = http_request.body(body.clone()).unwrap();
|
||||
log::info!("{:?}", http_request);
|
||||
|
||||
match T::Incoming::try_from(http_request) {
|
||||
match T::Incoming::try_from(dbg!(http_request)) {
|
||||
Ok(t) => Success(Ruma {
|
||||
body: t,
|
||||
user_id,
|
||||
|
@ -151,6 +151,9 @@ where
|
|||
.sized_body(Cursor::new(http_response.body().clone()))
|
||||
.await;
|
||||
|
||||
let status = http_response.status();
|
||||
response.raw_status(status.into(), "");
|
||||
|
||||
for header in http_response.headers() {
|
||||
response
|
||||
.raw_header(header.0.to_string(), header.1.to_str().unwrap().to_owned());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue