summaryrefslogtreecommitdiff
path: root/app/app.go
diff options
context:
space:
mode:
authorHeinrich 'Henrik' Langos <gumbo2000@noreply@mills.io>2023-01-21 00:59:27 +0000
committerJames Mills <james@mills.io>2023-01-21 00:59:27 +0000
commiteba9db5be52a83e4e94207b0237957eb353ddfff (patch)
tree078aacb8f42fe46ea585d3de8e6c86d22d7385c5 /app/app.go
parent6a4ea237948912e9431bbf21c8832ddda9bec941 (diff)
fix: Fix initial rendering of import page (#63)
Without this, the GET request on the `import` function will fail. Reviewed-on: https://git.mills.io/prologic/tube/pulls/63 Co-authored-by: Heinrich 'Henrik' Langos <gumbo2000@noreply@mills.io> Co-committed-by: Heinrich 'Henrik' Langos <gumbo2000@noreply@mills.io>
Diffstat (limited to 'app/app.go')
-rw-r--r--app/app.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/app.go b/app/app.go
index 9d0828b..1b1afe5 100644
--- a/app/app.go
+++ b/app/app.go
@@ -427,7 +427,13 @@ func (a *App) uploadHandler(w http.ResponseWriter, r *http.Request) {
// HTTP handler for /import
func (a *App) importHandler(w http.ResponseWriter, r *http.Request) {
if r.Method == "GET" {
- ctx := &struct{}{}
+ ctx := &struct {
+ Config *Config
+ Playing *media.Video
+ }{
+ Config: a.Config,
+ Playing: &media.Video{ID: ""},
+ }
a.render("import", w, ctx)
} else if r.Method == "POST" {
r.ParseMultipartForm(1024)