Skip to content

Commit 00ee7f5

Browse files
author
pikachuren
committed
feat(media): allow any logged-in user to manage their own media app keys
1 parent ae01262 commit 00ee7f5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎server/router.go‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ func Init(e *gin.Engine) {
8181
api.POST("/auth/login/ldap", handles.LoginLdap)
8282
auth.GET("/me", handles.CurrentUser)
8383
auth.POST("/me/update", handles.UpdateCurrent)
84+
// 媒体应用密钥(每个登录用户都可以为自己的客户端签发密钥)
85+
auth.GET("/me/appkey/list", handles.ListMediaAppKeys)
86+
auth.POST("/me/appkey/create", handles.CreateMediaAppKey)
87+
auth.POST("/me/appkey/delete", handles.DeleteMediaAppKey)
8488
auth.GET("/me/sshkey/list", handles.ListMyPublicKey)
8589
auth.POST("/me/sshkey/add", handles.AddMyPublicKey)
8690
auth.POST("/me/sshkey/delete", handles.DeleteMyPublicKey)
@@ -264,6 +268,7 @@ func fsAndShare(g *gin.RouterGroup) {
264268
mediaPublic.GET("/folders", handles.PublicListFolders)
265269
mediaPublic.GET("/scan_paths", handles.PublicListScanPaths)
266270
mediaPublic.GET("/strm", handles.GetMediaStrm)
271+
mediaPublic.GET("/stream_url", handles.GetMediaStreamURL)
267272

268273
// 转码 - 用户态:申请播放
269274
g.POST("/transcode/play", handles.RequireMediaEnabled, handles.TranscodePlay)

0 commit comments

Comments
 (0)