aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/account/icon.go4
-rw-r--r--backend/admin/templates/games.html6
-rw-r--r--backend/admin/templates/users.html4
3 files changed, 7 insertions, 7 deletions
diff --git a/backend/account/icon.go b/backend/account/icon.go
index 4f195c6..9e5e379 100644
--- a/backend/account/icon.go
+++ b/backend/account/icon.go
@@ -34,8 +34,8 @@ func FetchIcon(
return fmt.Errorf("failed to fetch user icon (uid=%d): %w", userID, err)
}
// Download user icon file.
- filePath := fmt.Sprintf("/files/img/%s/icon%s", url.PathEscape(user.Username), path.Ext(avatarURL))
- if err := downloadFile(ctx, fortee.Endpoint+avatarURL, "/data"+filePath); err != nil {
+ filePath := fmt.Sprintf("files/img/%s/icon%s", url.PathEscape(user.Username), path.Ext(avatarURL))
+ if err := downloadFile(ctx, fortee.Endpoint+avatarURL, "/data/"+filePath); err != nil {
return fmt.Errorf("failed to fetch user icon (uid=%d): %w", userID, err)
}
// Save user icon path.
diff --git a/backend/admin/templates/games.html b/backend/admin/templates/games.html
index 402c702..d642f07 100644
--- a/backend/admin/templates/games.html
+++ b/backend/admin/templates/games.html
@@ -11,15 +11,15 @@
<ul>
{{ range .Games }}
<li>
- <a href="{{ $.BasePath }}/admin/games/{{ .GameID }}">
+ <a href="{{ $.BasePath }}admin/games/{{ .GameID }}">
{{ .DisplayName }} (id={{ .GameID }} type={{ .GameType }} {{ if not .IsPublic }}private{{ end }})
</a>
<ul>
{{ if .IsPublic }}
- <li><a href="{{ $.BasePath }}/golf/{{ .GameID }}/play">Play</a></li>
+ <li><a href="{{ $.BasePath }}golf/{{ .GameID }}/play">Play</a></li>
{{ end }}
{{ if .IsPublic }}
- <li><a href="{{ $.BasePath }}/golf/{{ .GameID }}/watch">Watch</a></li>
+ <li><a href="{{ $.BasePath }}golf/{{ .GameID }}/watch">Watch</a></li>
{{ end }}
</ul>
</li>
diff --git a/backend/admin/templates/users.html b/backend/admin/templates/users.html
index 4b8e6dc..39ec589 100644
--- a/backend/admin/templates/users.html
+++ b/backend/admin/templates/users.html
@@ -8,10 +8,10 @@
<ul>
{{ range .Users }}
<li>
- <a href="{{ $.BasePath }}/admin/users/{{ .UserID }}">
+ <a href="{{ $.BasePath }}admin/users/{{ .UserID }}">
{{ .DisplayName }} (id={{ .UserID }} username={{ .Username }}){{ if .IsAdmin }} <em>admin</em>{{ end }}
</a>
- <form method="post" action="{{ $.BasePath }}/admin/users/{{ .UserID }}/fetch-icon">
+ <form method="post" action="{{ $.BasePath }}admin/users/{{ .UserID }}/fetch-icon">
<button type="submit">Fetch Icon</button>
</form>
</li>