sign.ts 422 B

123456789101112131415161718192021
  1. import { GET_SIG } from '../utils/apiList'
  2. import { request, Response } from '../utils/http'
  3. interface SingResType {
  4. expire: number,
  5. sdkAppId: number,
  6. sign: string,
  7. }
  8. type RoomDetailRes = Response & {
  9. data: SingResType
  10. }
  11. export const getRTCSig = async (userId: string): Promise<SingResType> => {
  12. const res = await request.get<RoomDetailRes>(GET_SIG, {
  13. userId
  14. })
  15. return res.data
  16. }