Skip to content

Commit

Permalink
templates: make readDirFilterString actually use the name argument
Browse files Browse the repository at this point in the history
website/admin: simplify range loop
  • Loading branch information
Wessie committed Jan 3, 2025
1 parent df33eb7 commit 359b83c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion templates/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ func readDirFilter(fsys fs.FS, name string, fn func(fs.DirEntry) bool) ([]fs.Dir
func readDirFilterString(fsys fs.FS, name string, fn func(fs.DirEntry) bool) ([]string, error) {
const op errors.Op = "templates/readDirFilterString"

entries, err := readDirFilter(fsys, ".", fn)
entries, err := readDirFilter(fsys, name, fn)
if err != nil {
return nil, errors.E(op, err)
}
Expand Down
2 changes: 1 addition & 1 deletion website/admin/profiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ func (pf *ProfileForm) ToValues() url.Values {
values.Set("username", pf.Username)
values.Set("ip", pf.IP)
values.Set("email", pf.Email)
for perm, _ := range pf.UserPermissions {
for perm := range pf.UserPermissions {
values.Add("permissions", string(perm))
}

Expand Down

0 comments on commit 359b83c

Please sign in to comment.