Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
tank
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
tank
Commits
bf930210
Commit
bf930210
authored
5 years ago
by
Christian Pointner
Browse files
Options
Downloads
Patches
Plain Diff
some more refactoring
parent
63bce4d6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
api/v1/api.go
+31
-31
31 additions, 31 deletions
api/v1/api.go
auth/auth.go
+3
-3
3 additions, 3 deletions
auth/auth.go
with
34 additions
and
34 deletions
api/v1/api.go
+
31
−
31
View file @
bf930210
...
...
@@ -68,37 +68,37 @@ func InstallHTTPHandler(r *gin.RouterGroup, st *store.Store, im *importer.Import
api
:=
NewAPI
(
st
,
im
,
infoLog
,
errLog
,
dbgLog
)
// Shows
r
.
GET
(
"/shows"
,
api
.
ListS
hows
)
r
.
POST
(
"/shows/:show-id
"
,
api
.
Create
Show
)
// Files
r
.
GET
(
"/shows/:show-id/files"
,
api
.
ListFilesOfShow
)
r
.
POST
(
"/shows/:show-id/files"
,
api
.
CreateFileForShow
)
r
.
GET
(
"/shows/:show-id/files/:file-id"
,
api
.
ReadFileOfShow
)
r
.
PATCH
(
"/shows/:show-id/files/:file-id"
,
api
.
PatchFileOfShow
)
r
.
DELETE
(
"/shows/:show-id/files/:file-id
"
,
api
.
Delete
FileOfShow
)
r
.
GET
(
"
/shows/:show-id/files/
:file-id
/usage
"
,
api
.
Read
UsageOfFile
)
r
.
GET
(
"/shows/:show-id/files/:file-id/import"
,
api
.
ReadImportOfFile
)
r
.
DELETE
(
"/shows/:show-id/files/:file-id/import"
,
api
.
CancelImportOfFile
)
// // TODO: distignuish between flow.js and simple upload using the content type?!?
r
.
PUT
(
"/shows/:show-id/files/
:file-id/
upload
"
,
api
.
UploadFileSimp
le
)
r
.
POST
(
"/shows/:show-id/files/:file-id/upload"
,
api
.
UploadFileFlowJS
)
r
.
GET
(
"/shows/:show-id/files/:file-id/upload"
,
api
.
TestFileFlowJS
)
// Imports
r
.
GET
(
"
/shows/:show-id/imports"
,
api
.
ListImportsOfShow
)
//
Playlists
r
.
GET
(
"/shows/:show-id/playlists"
,
api
.
List
Playlists
OfShow
)
r
.
POST
(
"/shows/:show-id/
playlists"
,
api
.
Create
Playlist
For
Show
)
r
.
GET
(
"/shows/:show-id/
playlists
/
:playlist-id"
,
api
.
ReadPlaylistOfShow
)
r
.
PUT
(
"/shows/:show-id/
playlists
/
:playlist-id"
,
api
.
UpdatePlaylistOfShow
)
r
.
DELETE
(
"/shows/:show-id/playlists/
:playlist-id"
,
api
.
DeletePlaylistOfShow
)
shows
:=
r
.
Group
(
"s
hows
"
)
shows
.
GET
(
"
"
,
api
.
List
Show
s
)
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"
)
//
// Show/Files
files
.
GET
(
"
"
,
api
.
List
File
s
OfShow
)
files
.
POST
(
""
,
api
.
CreateFileForShow
)
files
.
GET
(
":file-id"
,
api
.
Read
FileOfShow
)
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
.
CancelImportOfFi
le
)
// 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
.
List
Playlist
sOf
Show
)
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)
}
This diff is collapsed.
Click to expand it.
auth/auth.go
+
3
−
3
View file @
bf930210
...
...
@@ -177,16 +177,16 @@ func InstallHTTPHandler(r *gin.RouterGroup) {
return
}
backends
:=
r
.
Group
(
"
/
backends"
)
backends
:=
r
.
Group
(
"backends"
)
backends
.
GET
(
""
,
listBackends
)
session
:=
r
.
Group
(
"
/
session"
)
session
:=
r
.
Group
(
"session"
)
session
.
POST
(
""
,
newSession
)
session
.
GET
(
""
,
getSession
)
session
.
DELETE
(
""
,
deleteSession
)
if
auth
.
oidc
!=
nil
{
oidc
:=
r
.
Group
(
"
/
oidc"
)
oidc
:=
r
.
Group
(
"oidc"
)
oidc
.
GET
(
"login"
,
auth
.
oidc
.
Login
)
oidc
.
GET
(
"callback"
,
auth
.
oidc
.
Callback
)
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment