We want to return a Result<Blog>, instead of a QueryResult<Blog>.
We can use map_err() to map it to the desired error type.
thanks to review from @BaptisteGelez & @fdb-hiroshima.
we can use "first()" instead of limit(1).load().etc…
since on a UNIQUE field, we only expect 1 result.
first() returns QueryResult, which is Result<T, diesel::Error>, so we
need to implement a converter for that error type.
This commit addresses @fdb-hiroshima's review.
how this works: we use find_by_host() to find the Host in question, the
defer to the existing function!
Caveat: Currently, we, in that function, we do another lookup DB lookup
for the Blog, even thou we already know it.
It might be wise, to have both of those another wrapper here?!
this rewrites the URL to /custom_domain/<url>
(we have no route handlers for this path yet)
Lots of help from @fdb-hiroshima & @BaptisteGelez in dealing with the
borrow checker — thank you 💜️
we can use this to handle rocket Requests (from_request)
but we still have to figure out how to automatically assign the type to
custom_domain: Optional<Host>, and public_domain: Host.
* Bump activitystreams-derive from 0.1.0 to 0.1.1
* Bump tantivy from 0.9.1 to 0.10.1
* Bump rpassword from 3.0.2 to 4.0.1
* Bump num_cpus from 1.10.0 to 1.10.1
* Bump serde_qs from 0.4.6 to 0.5.0
* Bump stdweb-internal-runtime from 0.1.3 to 0.1.4
* [Security] Bump smallvec from 0.6.9 to 0.6.10
* Bump chrono from 0.4.6 to 0.4.7
* Bump bcrypt from 0.4.0 to 0.5.0
* Bump serde_json from 1.0.39 to 1.0.40
* Bump tokio from 0.1.21 to 0.1.22
* Bump scheduled-thread-pool from 0.2.0 to 0.2.2
* Bump stdweb from 0.4.14 to 0.4.18
* Bump hyper from 0.12.29 to 0.12.33
* Bump reqwest from 0.9.17 to 0.9.19
* Bump url from 1.7.2 to 2.1.0
* send scheme as part of webfinger remote follow template
fixtsileo/microblog.pub#49
* bump webfinger to 0.4.1
* cargo fmt
* revert translations
* Use group: prefix for blog webfinger queries
* initial RTL support
* fix dir in template-util
* fix dir in blogs new
* fix dir in blogs details
* fix dir in posts new
* fix dir in posts details
* fix dir in posts remote
* Fix dir in partials
some parts should be recheck carefully in real usage