mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: notifications: use username in workspace URLs (#14011)
This commit is contained in:
@@ -42,10 +42,11 @@ func TestGoTemplate(t *testing.T) {
|
||||
name: "render workspace URL",
|
||||
in: `[{
|
||||
"label": "View workspace",
|
||||
"url": "{{ base_url }}/@{{.UserName}}/{{.Labels.name}}"
|
||||
"url": "{{ base_url }}/@{{.UserUsername}}/{{.Labels.name}}"
|
||||
}]`,
|
||||
payload: types.MessagePayload{
|
||||
UserName: "johndoe",
|
||||
UserName: "John Doe",
|
||||
UserUsername: "johndoe",
|
||||
Labels: map[string]string{
|
||||
"name": "my-workspace",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user