throttle /lobby/seeks XHR

This commit is contained in:
Thibault Duplessis 2020-09-29 15:54:55 +02:00
parent 4f60de03b3
commit ca125c99b2

View file

@ -1,7 +1,8 @@
import * as xhr from 'common/xhr'; import * as xhr from 'common/xhr';
import throttle from 'common/throttle';
import { Pool } from './interfaces'; import { Pool } from './interfaces';
export const seeks = () => xhr.json('/lobby/seeks'); export const seeks = throttle(2000, () => xhr.json('/lobby/seeks'));
export const nowPlaying = () => xhr.json('/account/now-playing').then(o => o.nowPlaying); export const nowPlaying = () => xhr.json('/account/now-playing').then(o => o.nowPlaying);