Skip to content

Commit 04060f1

Browse files
committed
cleanup
1 parent 9b80ce0 commit 04060f1

File tree

1 file changed

+0
-23
lines changed
  • assets/js/components/Config/DeviceModal

1 file changed

+0
-23
lines changed

assets/js/components/Config/DeviceModal/index.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff 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-
8881
export 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
}

0 commit comments

Comments
 (0)