Skip to content

Commit

Permalink
tokn removed
Browse files Browse the repository at this point in the history
  • Loading branch information
xdzqyyds authored Dec 6, 2024
1 parent 409ad2a commit 44650eb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
7 changes: 4 additions & 3 deletions server/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/url"

woomMiddleware "woom/server/api/middleware"
v1 "woom/server/api/v1"
"woom/server/api/v1"
"woom/server/helper"
"woom/static"

Expand Down Expand Up @@ -49,15 +49,16 @@ func NewApi(rdb *redis.Client, secret string, live777Url string, live777Token st
r.Post("/room/{roomId}/stream", handle.CreateRoomStream)
r.Patch("/room/{roomId}/stream/{streamId}", handle.UpdateRoomStream)
r.Delete("/room/{roomId}/stream/{streamId}", handle.DestroyRoomStream)
r.HandleFunc("/whip/{uuid}", handler(proxy, live777Url, live777Token))
r.HandleFunc("/whep/{uuid}", handler(proxy, live777Url, live777Token))
})

r.Post("/user/", handle.CreateUser)

//r.Post("/room/{roomId}/message", handle.CreateMessage)
//r.Get("/room/{roomId}/message", handle.ShowMessage)

r.HandleFunc("/whip/{uuid}", handler(proxy, live777Url, live777Token))
r.HandleFunc("/whep/{uuid}", handler(proxy, live777Url, live777Token))

r.Handle("/*", http.StripPrefix("/", http.FileServer(helper.NewSinglePageApp("index.html", http.FS(static.Dist)))))
return r
}
4 changes: 2 additions & 2 deletions webapp/components/use/whip.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useSyncExternalStore } from 'react'
import { event, Context, Data } from './whxp'
import { Stream, StreamState, token } from '../../lib/api'
import { Stream, StreamState } from '../../lib/api'
import { WHIPClient } from 'whip-whep/whip'
import {
deviceNone,
Expand Down Expand Up @@ -188,7 +188,7 @@ class WHIPContext extends Context {

try {
const url = location.origin + `/whip/${id}`
await client.publish(pc, url, token)
await client.publish(pc, url)
} catch (e) {
console.log(e)
userStatus.state = StreamState.Failed
Expand Down
2 changes: 0 additions & 2 deletions webapp/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ export {
delStream,

StreamState,

token,
}

export type {
Expand Down

0 comments on commit 44650eb

Please sign in to comment.