]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/shared/rest/rest-data-source.ts
57a2efb57bd9f061f9a11901fee78e73f2ab5422
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / rest / rest-data-source.ts
1 export class RestDataSource {
2 // protected addSortRequestOptions (requestOptions: RequestOptionsArgs) {
3 // const searchParams = requestOptions.params as URLSearchParams
4 //
5 // if (this.sortConf) {
6 // this.sortConf.forEach((fieldConf) => {
7 // const sortPrefix = fieldConf.direction === 'desc' ? '-' : ''
8 //
9 // searchParams.set(this.conf.sortFieldKey, sortPrefix + fieldConf.field)
10 // })
11 // }
12 //
13 // return requestOptions
14 // }
15 //
16 // protected addPagerRequestOptions (requestOptions: RequestOptionsArgs) {
17 // const searchParams = requestOptions.params as URLSearchParams
18 //
19 // if (this.pagingConf && this.pagingConf['page'] && this.pagingConf['perPage']) {
20 // const perPage = this.pagingConf['perPage']
21 // const page = this.pagingConf['page']
22 //
23 // const start = (page - 1) * perPage
24 // const count = perPage
25 //
26 // searchParams.set('start', start.toString())
27 // searchParams.set('count', count.toString())
28 // }
29 //
30 // return requestOptions
31 // }
32 }