Skip to content

Commit

Permalink
fix showing localhost as domain when editing any link
Browse files Browse the repository at this point in the history
  • Loading branch information
poeti8 committed Jan 11, 2025
1 parent c253b75 commit e022cf5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions server/handlers/renders.handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ async function linkEdit(req, res) {
});
res.render("partials/links/edit", {
...(link && utils.sanitize.link_html(link)),
domain: link.domain || env.DEFAULT_DOMAIN,
});
}

Expand All @@ -299,6 +300,7 @@ async function linkEditAdmin(req, res) {
});
res.render("partials/admin/links/edit", {
...(link && utils.sanitize.link_html(link)),
domain: link.domain || env.DEFAULT_DOMAIN,
});
}

Expand Down
2 changes: 1 addition & 1 deletion server/views/partials/admin/links/edit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{{#if errors.target}}<p class="error">{{errors.target}}</p>{{/if}}
</label>
<label class="{{#if errors.address}}error{{/if}}">
localhost:3000/
{{domain}}/
<input
id="edit-address-{{id}}"
name="address"
Expand Down
2 changes: 1 addition & 1 deletion server/views/partials/links/edit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{{#if errors.target}}<p class="error">{{errors.target}}</p>{{/if}}
</label>
<label class="{{#if errors.address}}error{{/if}}">
localhost:3000/
{{domain}}/
<input
id="edit-address-{{id}}"
name="address"
Expand Down

0 comments on commit e022cf5

Please sign in to comment.