diff options
| author | Heinrich 'Henrik' Langos <gumbo2000@noreply@mills.io> | 2023-01-21 00:59:27 +0000 |
|---|---|---|
| committer | James Mills <james@mills.io> | 2023-01-21 00:59:27 +0000 |
| commit | eba9db5be52a83e4e94207b0237957eb353ddfff (patch) | |
| tree | 078aacb8f42fe46ea585d3de8e6c86d22d7385c5 /app/app.go | |
| parent | 6a4ea237948912e9431bbf21c8832ddda9bec941 (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.go | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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) |
