Skip to content

Commit 72d8327

Browse files
committed
refactor(openwrt-config-dashboard): unused modules within JSON-RPC http calls were removed
each of the imports into the functions that make the different JSON-RPC calls, (the ones that represent the communication with the router) were removed to clean up the code and improve readability.
1 parent 5407d67 commit 72d8327

File tree

5 files changed

+0
-18
lines changed

5 files changed

+0
-18
lines changed

apps/openwrt-config-dashboard/src/hooks/useLuciRCPjsonClient/fetchCalls/getAllDevicesIP:Name.ts

-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
import { LoginTokenResponse } from '@/types';
2-
import axios, { AxiosRequestConfig, AxiosResponse } from 'axios';
3-
import { act } from 'react-test-renderer';
4-
import tough, { Cookie } from 'tough-cookie';
5-
import { t } from 'xstate';
61
import { Sid } from '..';
72

83
function matchesThymioPattern(str: string): boolean {

apps/openwrt-config-dashboard/src/hooks/useLuciRCPjsonClient/fetchCalls/getIfstatus.ts

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import { LoginTokenResponse } from '@/types';
2-
import axios, { AxiosRequestConfig, AxiosResponse } from 'axios';
3-
import tough, { Cookie } from 'tough-cookie';
41
import { Sid } from '..';
52

63
export async function getIfStatus({ sid }: { sid: Sid }): Promise<any> {

apps/openwrt-config-dashboard/src/hooks/useLuciRCPjsonClient/fetchCalls/getUptime.ts

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import { LoginTokenResponse } from '@/types';
2-
import axios, { AxiosRequestConfig, AxiosResponse } from 'axios';
3-
import tough, { Cookie } from 'tough-cookie';
41
import { Sid } from '..';
52

63
export async function getUptime({ sid }: { sid: Sid }): Promise<number> {

apps/openwrt-config-dashboard/src/hooks/useLuciRCPjsonClient/fetchCalls/getWifiStatus.ts

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import { LoginTokenResponse } from '@/types';
2-
import axios, { AxiosRequestConfig, AxiosResponse } from 'axios';
3-
import tough, { Cookie } from 'tough-cookie';
41
import { Sid } from '..';
52

63
function parseStringToJson(inputString: string): any {

apps/openwrt-config-dashboard/src/hooks/useLuciRCPjsonClient/fetchCalls/updateRootPassword.ts

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
import { LoginTokenResponse } from '@/types';
2-
import axios, { AxiosRequestConfig, AxiosResponse } from 'axios';
3-
import tough, { Cookie } from 'tough-cookie';
4-
51
export async function updateRootPassword({
62
newPassword,
73
sidToken,

0 commit comments

Comments
 (0)