動画を確認画面つきで複数削除できるようにする(ステップ13)
This commit is contained in:
@@ -24,6 +24,8 @@ type page struct {
|
||||
Library *libraryView
|
||||
Series *seriesView
|
||||
Video *videoView
|
||||
DeleteConfirm *deleteConfirmView
|
||||
DeleteResult *deleteResultView
|
||||
}
|
||||
|
||||
type JobStore interface {
|
||||
@@ -42,6 +44,8 @@ type JobStore interface {
|
||||
ListSucceededJobs(context.Context, int) ([]store.Job, error)
|
||||
ListLibrarySeries(context.Context) ([]store.LibrarySeries, error)
|
||||
ListSucceededJobsBySeries(context.Context, string) ([]store.Job, error)
|
||||
ListSucceededJobsByIDs(context.Context, []int64) ([]store.Job, error)
|
||||
ListSucceededJobsBySeriesIDs(context.Context, []string) ([]store.Job, error)
|
||||
GetSucceededJob(context.Context, int64) (store.Job, error)
|
||||
DeleteSucceededJob(context.Context, int64) error
|
||||
}
|
||||
@@ -100,6 +104,7 @@ func NewHandler(fetcher NewerFetcher, jobs JobStore, videoDir string, now func()
|
||||
mux.HandleFunc("GET /library/series/{series_id}", s.librarySeriesPage)
|
||||
mux.HandleFunc("GET /library/{id}", s.videoPage)
|
||||
mux.HandleFunc("GET /videos/{id}", s.serveVideo)
|
||||
mux.HandleFunc("POST /library/{id}/delete", s.deleteVideo)
|
||||
mux.HandleFunc("POST /library/delete/confirm", s.confirmDeleteVideos)
|
||||
mux.HandleFunc("POST /library/delete", s.deleteVideos)
|
||||
return mux
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user