mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-28 07:56:37 +01:00
fix: fixes download link not working (#2274)
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="dropdown-item" :href="`${base}/api/logs/download?id=${container.id}&host=${sessionHost}`">
|
||||
<a class="dropdown-item" :href="`${base}/api/logs/download/${sessionHost}/${container.id}`">
|
||||
<div class="level is-justify-content-start">
|
||||
<div class="level-left">
|
||||
<div class="level-item">
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"scripts": {
|
||||
"watch:frontend": "vite --open http://localhost:3100/",
|
||||
"watch:backend": "LIVE_FS=true DEV=true DOZZLE_ADDR=localhost:3100 reflex -c .reflex",
|
||||
"dev": "concurrently \"npm:watch:*\"",
|
||||
"dev": "concurrently --kill-others \"npm:watch:*\"",
|
||||
"build": "vite build",
|
||||
"preview": "LIVE_FS=true DOZZLE_ADDR=localhost:3100 reflex -c .reflex",
|
||||
"release": "bumpp",
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
)
|
||||
|
||||
func (h *handler) downloadLogs(w http.ResponseWriter, r *http.Request) {
|
||||
id := r.URL.Query().Get("id")
|
||||
id := chi.URLParam(r, "id")
|
||||
container, err := h.clientFromRequest(r).FindContainer(id)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
|
||||
@@ -63,7 +63,7 @@ func createRouter(h *handler) *chi.Mux {
|
||||
r.Group(func(r chi.Router) {
|
||||
r.Use(authorizationRequired)
|
||||
r.Get("/api/logs/stream/{host}/{id}", h.streamLogs)
|
||||
r.Get("/api/logs/download/{host}/{id}", h.downloadLogs) //TODO
|
||||
r.Get("/api/logs/download/{host}/{id}", h.downloadLogs)
|
||||
r.Get("/api/logs/{host}/{id}", h.fetchLogsBetweenDates)
|
||||
r.Get("/api/events/stream", h.streamEvents)
|
||||
r.Get("/logout", h.clearSession)
|
||||
|
||||
Reference in New Issue
Block a user