Fix typos

This commit is contained in:
Alex Holliday
2024-09-22 12:17:34 +08:00
parent 1c8376dc24
commit 0791c7e5c5
4 changed files with 11 additions and 5 deletions

View File

@@ -15,7 +15,7 @@ export const createPageSpeed = createAsyncThunk(
const { authToken, monitor } = data;
const res = await networkService.createMonitor({
authToken: authToken,
moniotr: monitor,
monitor: monitor,
});
return res.data;
} catch (error) {
@@ -36,7 +36,10 @@ export const getPagespeedMonitorById = createAsyncThunk(
async (data, thunkApi) => {
try {
const { authToken, monitorId } = data;
const res = await networkService.getMonitorByid({ authToken, monitorId });
const res = await networkService.getMonitorById({
authToken: authToken,
monitorId: monitorId,
});
return res.data;
} catch (error) {
if (error.response && error.response.data) {

View File

@@ -36,7 +36,10 @@ export const getUptimeMonitorById = createAsyncThunk(
async (data, thunkApi) => {
try {
const { authToken, monitorId } = data;
const res = await networkService.getMonitorByid({ authToken, monitorId });
const res = await networkService.getMonitorById({
authToken: authToken,
monitorId: monitorId,
});
return res.data;
} catch (error) {
if (error.response && error.response.data) {

View File

@@ -42,7 +42,7 @@ const PaginationTable = ({ monitorId, dateRange }) => {
try {
const res = await networkService.getChecksByMonitor({
authToken: authToken,
moniotrId: monitorId,
monitoirId: monitorId,
sortOrder: "desc",
limit: null,
dateRange: dateRange,

View File

@@ -30,7 +30,7 @@ class NetworkService {
* @returns {Promise<AxiosResponse>} The response from the axios GET request.
*/
async getMonitorByid(config) {
async getMonitorById(config) {
return this.axiosInstance.get(`/monitors/${config.monitorId}`, {
headers: {
Authorization: `Bearer ${config.authToken}`,