Skip to content
Snippets Groups Projects
Commit 9402f567 authored by Christian Pointner's avatar Christian Pointner
Browse files

some more cleanup

parent bf930210
No related branches found
No related tags found
No related merge requests found
......@@ -69,36 +69,38 @@ func InstallHTTPHandler(r *gin.RouterGroup, st *store.Store, im *importer.Import
// Shows
shows := r.Group("shows")
shows.GET("", api.ListShows)
shows.POST(":show-id", api.CreateShow)
shows.GET(":show-id/imports", api.ListImportsOfShow)
files := shows.Group(":show-id/files")
playlists := shows.Group(":show-id/playlists")
{
shows.GET("", api.ListShows)
shows.POST(":show-id", api.CreateShow)
shows.GET(":show-id/imports", api.ListImportsOfShow)
//
// Show/Files
files.GET("", api.ListFilesOfShow)
files.POST("", api.CreateFileForShow)
files.GET(":file-id", api.ReadFileOfShow)
files.PATCH(":file-id", api.PatchFileOfShow)
files.DELETE(":file-id", api.DeleteFileOfShow)
// Show/Files
files := shows.Group(":show-id/files")
{
files.GET("", api.ListFilesOfShow)
files.POST("", api.CreateFileForShow)
files.GET(":file-id", api.ReadFileOfShow)
files.PATCH(":file-id", api.PatchFileOfShow)
files.DELETE(":file-id", api.DeleteFileOfShow)
files.GET(":file-id/usage", api.ReadUsageOfFile)
files.GET(":file-id/import", api.ReadImportOfFile)
files.DELETE(":file-id/import", api.CancelImportOfFile)
files.GET(":file-id/usage", api.ReadUsageOfFile)
files.GET(":file-id/import", api.ReadImportOfFile)
files.DELETE(":file-id/import", api.CancelImportOfFile)
// TODO: distignuish between flow.js and simple upload using the content type?!?
files.PUT(":file-id/upload", api.UploadFileSimple)
files.POST(":file-id/upload", api.UploadFileFlowJS)
files.GET(":file-id/upload", api.TestFileFlowJS)
// TODO: distignuish between flow.js and simple upload using the content type?!?
files.PUT(":file-id/upload", api.UploadFileSimple)
files.POST(":file-id/upload", api.UploadFileFlowJS)
files.GET(":file-id/upload", api.TestFileFlowJS)
}
//
// Show/Playlists
playlists.GET("", api.ListPlaylistsOfShow)
playlists.POST("", api.CreatePlaylistForShow)
playlists.GET(":playlist-id", api.ReadPlaylistOfShow)
playlists.PUT(":playlist-id", api.UpdatePlaylistOfShow)
playlists.DELETE(":playlist-id", api.DeletePlaylistOfShow)
// r.Handle("/", indexHandler)
// Show/Playlists
playlists := shows.Group(":show-id/playlists")
{
playlists.GET("", api.ListPlaylistsOfShow)
playlists.POST("", api.CreatePlaylistForShow)
playlists.GET(":playlist-id", api.ReadPlaylistOfShow)
playlists.PUT(":playlist-id", api.UpdatePlaylistOfShow)
playlists.DELETE(":playlist-id", api.DeletePlaylistOfShow)
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment