File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ pub async fn new(app: AppState, req: BytesRequest) -> AppResult<Json<Value>> {
143
143
144
144
if let Some ( recipient) = recipient {
145
145
let email = NewTokenEmail {
146
+ token_name : name,
146
147
user_name : & user. gh_login ,
147
148
domain : & app. emails . domain ,
148
149
} ;
@@ -219,6 +220,7 @@ pub async fn revoke_current(app: AppState, req: Parts) -> AppResult<Response> {
219
220
}
220
221
221
222
struct NewTokenEmail < ' a > {
223
+ token_name : & ' a str ,
222
224
user_name : & ' a str ,
223
225
domain : & ' a str ,
224
226
}
@@ -231,9 +233,10 @@ impl<'a> crate::email::Email for NewTokenEmail<'a> {
231
233
"\
232
234
Hello {user_name}!
233
235
234
- A new API token was recently added to your {domain} account.
236
+ A new API token with the name \" {token_name} \" was recently added to your {domain} account.
235
237
236
238
If this wasn't you, you should revoke the token immediately: https://{domain}/settings/tokens" ,
239
+ token_name = self . token_name,
237
240
user_name = self . user_name,
238
241
domain = self . domain,
239
242
)
You can’t perform that action at this time.
0 commit comments