Replace jquery $.param with native URLSearchParams (#2613)
This commit is contained in:
		
							parent
							
								
									c9c522a2b1
								
							
						
					
					
						commit
						facbbf6acf
					
				|  | @ -1,4 +1,3 @@ | ||||||
| import $ from 'jquery' |  | ||||||
| import fs from 'fs' | import fs from 'fs' | ||||||
| 
 | 
 | ||||||
| const state = { | const state = { | ||||||
|  | @ -71,7 +70,7 @@ const actions = { | ||||||
| 
 | 
 | ||||||
|   invidiousAPICall({ state }, payload) { |   invidiousAPICall({ state }, payload) { | ||||||
|     return new Promise((resolve, reject) => { |     return new Promise((resolve, reject) => { | ||||||
|       const requestUrl = state.currentInvidiousInstance + '/api/v1/' + payload.resource + '/' + payload.id + '?' + $.param(payload.params) |       const requestUrl = state.currentInvidiousInstance + '/api/v1/' + payload.resource + '/' + payload.id + '?' + new URLSearchParams(payload.params).toString() | ||||||
| 
 | 
 | ||||||
|       fetch(requestUrl) |       fetch(requestUrl) | ||||||
|         .then((response) => response.json()) |         .then((response) => response.json()) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue