Hand URIs to email templates, not tokens.

- The mail templates should not be concerned with the url schema.

  - Fixes #78.
This commit is contained in:
Justus Winter 2019-03-12 16:52:46 +01:00
parent de91be2b31
commit 1f2471ba61
No known key found for this signature in database
GPG Key ID: 686F55B4AB2B3386
5 changed files with 8 additions and 8 deletions

View File

@ -17,7 +17,7 @@
To de-list your key on {{domain}}, follow this link:
</p>
<p>
<a href="https://{{domain}}/delete/{{token}}">https://{{domain}}/delete/{{token}}</a>
<a href="{{uri}}">{{uri}}</a>
</p>
<p>
If you do not want to de-list your key, please ignore this

View File

@ -5,6 +5,6 @@ If it was not you, please ignore this email.
To de-list your key on {{domain}}, follow this link:
https://{{domain}}/delete/{{token}}
{{uri}}
If you do not want to de-list your key, please ignore this email.

View File

@ -22,7 +22,7 @@
{{domain}}, follow this link:
</p>
<p>
<a href="https://{{domain}}/publish/{{token}}">https://{{domain}}/publish/{{token}}</a>
<a href="{{uri}}">{{uri}}</a>
</p>
<p>
If you don't want to make the key available when searching for

View File

@ -8,7 +8,7 @@ If it was not you, or this is not your key, please ignore this email.
To make your key available when searching for "{{userid}}" on
{{domain}}, follow this link:
https://{{domain}}/publish/{{token}}
{{uri}}
If you don't want to make the key available when searching for
"{{userid}}", please ignore this email.

View File

@ -15,14 +15,14 @@ mod context {
#[derive(Serialize, Clone)]
pub struct Verification {
pub primary_fp: String,
pub token: String,
pub uri: String,
pub userid: String,
pub domain: String,
}
#[derive(Serialize, Clone)]
pub struct Deletion {
pub token: String,
pub uri: String,
pub domain: String,
}
}
@ -64,7 +64,7 @@ impl Service {
-> Result<()> {
let ctx = context::Verification {
primary_fp: tpk.fingerprint().to_string(),
token: token.to_string(),
uri: format!("https://{}/publish/{}", domain, token),
userid: userid.to_string(),
domain: domain.to_string(),
};
@ -81,7 +81,7 @@ impl Service {
domain: &str)
-> Result<()> {
let ctx = context::Deletion {
token: token.to_string(),
uri: format!("https://{}/delete/{}", domain, token),
domain: domain.to_string(),
};