File tree Expand file tree Collapse file tree 1 file changed +0
-23
lines changed
assets/js/components/Config/DeviceModal Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -78,13 +78,6 @@ export type AuthCheckResponse = {
7878 authId ?: string ;
7979} ;
8080
81- export type ProviderLoginResponse = {
82- loginUri ?: string ;
83- code ?: string ;
84- expiry ?: string ;
85- error ?: string ;
86- } ;
87-
8881export function handleError ( e : any , msg : string ) {
8982 console . error ( e ) ;
9083 let message = msg ;
@@ -253,21 +246,6 @@ export function createDeviceUtils(deviceType: DeviceType) {
253246 return { success : false , error : "unexpected error" } ;
254247 }
255248
256- async function getAuthProviderUrl ( authId : string ) : Promise < ProviderLoginResponse > {
257- try {
258- const url = `providerauth/login?id=${ encodeURIComponent ( authId ) } ` ;
259- const { status, data } = await baseApi . get < ProviderLoginResponse > ( url , {
260- validateStatus : ( code ) => [ 200 , 400 ] . includes ( code ) ,
261- } ) ;
262- if ( status === 200 ) {
263- return data ;
264- }
265- throw new Error ( data ?. error ?? "unknown error" ) ;
266- } catch ( error ) {
267- throw new Error ( ( error as Error ) . message ?? "unknown error" ) ;
268- }
269- }
270-
271249 return {
272250 test,
273251 update,
@@ -278,6 +256,5 @@ export function createDeviceUtils(deviceType: DeviceType) {
278256 loadTemplate,
279257 loadServiceValues,
280258 checkAuth,
281- getAuthProviderUrl,
282259 } ;
283260}
You can’t perform that action at this time.
0 commit comments