hkp: more informative /pks/add response
This commit is contained in:
parent
e6611228a7
commit
84451500ec
|
@ -53,7 +53,7 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h3>Uploading your key</h3>
|
<h3 id="gnupg-upload">Uploading your key</h3>
|
||||||
<p>
|
<p>
|
||||||
Keys can be uploaded with GnuPG's <tt>--send-keys</tt> command, but
|
Keys can be uploaded with GnuPG's <tt>--send-keys</tt> command, but
|
||||||
identity information can't be verified that way to make the key
|
identity information can't be verified that way to make the key
|
||||||
|
|
|
@ -128,13 +128,17 @@ pub fn pks_add_form_data(
|
||||||
|
|
||||||
#[post("/pks/add", format = "application/x-www-form-urlencoded", data = "<data>")]
|
#[post("/pks/add", format = "application/x-www-form-urlencoded", data = "<data>")]
|
||||||
pub fn pks_add_form(
|
pub fn pks_add_form(
|
||||||
|
state: rocket::State<HagridState>,
|
||||||
db: rocket::State<KeyDatabase>,
|
db: rocket::State<KeyDatabase>,
|
||||||
tokens_stateless: rocket::State<tokens::Service>,
|
tokens_stateless: rocket::State<tokens::Service>,
|
||||||
rate_limiter: rocket::State<RateLimiter>,
|
rate_limiter: rocket::State<RateLimiter>,
|
||||||
data: Data,
|
data: Data,
|
||||||
) -> MyResponse {
|
) -> MyResponse {
|
||||||
match vks_web::upload_post_form(db, tokens_stateless, rate_limiter, data) {
|
match vks_web::upload_post_form(db, tokens_stateless, rate_limiter, data) {
|
||||||
Ok(_) => MyResponse::plain("Ok".into()),
|
Ok(_) => {
|
||||||
|
let msg = format!("Upload successful. Note that identity information will only be published with verification! see {}/about/usage#gnupg-upload", state.base_uri);
|
||||||
|
MyResponse::plain(msg)
|
||||||
|
}
|
||||||
Err(err) => MyResponse::ise(err),
|
Err(err) => MyResponse::ise(err),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue