Compare commits

..

1 Commits

Author SHA1 Message Date
amaury.joly
4f18003fb4 add getChannelId(ChannelName) inside peertubeRequester 2021-07-30 17:15:37 +02:00

View File

@ -105,6 +105,18 @@ class PeerTubeRequester {
} }
} }
} }
async getChannelId(channelName: string): Promise<number> {
const response = await fetch(
new URL(`/api/v1/videos-channels/${channelName}`, this.domainName),
{
method: "gett"
}
);
const { id } = await response.json();
return id;
}
} }
export { PeerTubeRequester }; export { PeerTubeRequester };