Skip to content

Commit

Permalink
last
Browse files Browse the repository at this point in the history
  • Loading branch information
thakiyudheen committed Aug 21, 2024
1 parent 7e053dd commit 123fa1e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/redux/store/actions/admin/blockUnblockAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { config } from "../../../../common/configuration";
import { api_client } from "../../../../axios";
import { createAsyncThunk } from "@reduxjs/toolkit";
import { AxiosError } from "axios";
import { user } from "@/common/endPoint";


interface data {
Expand All @@ -12,7 +13,7 @@ export const blockUnblockAction = createAsyncThunk(
'user/getAll-instrictors',
async ( data : data , { rejectWithValue }) => {
try {
const response = await api_client.patch(`/api/user/block-unblock`,data,config)
const response = await api_client.patch(`${user}block-unblock`,data,config)

if(response.data.success){

Expand Down
3 changes: 2 additions & 1 deletion src/redux/store/actions/admin/getAllInstructorsAction.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { user } from "@/common/endPoint";
import { api_client } from "../../../../axios";
import { createAsyncThunk } from "@reduxjs/toolkit";
import { AxiosError } from "axios";
Expand All @@ -6,7 +7,7 @@ export const getAllInstructorsAction = createAsyncThunk(
'user/getAll-instrictors',
async ( data: {page?:number,limit?:number}, { rejectWithValue }) => {
try {
const response = await api_client.get(`/api/user/getAll-instructors`,{params:data}
const response = await api_client.get(`${user}getAll-instructors`,{params:data}
)

if(response.data.success){
Expand Down
3 changes: 2 additions & 1 deletion src/redux/store/actions/admin/getAllStudentAction.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { user } from "@/common/endPoint";
import { api_client } from "../../../../axios";
import { createAsyncThunk } from "@reduxjs/toolkit";
import { AxiosError } from "axios";
Expand All @@ -6,7 +7,7 @@ export const getAllStudentAction = createAsyncThunk(
'user/getAll-students',
async ( data :{page?:number,limit?:number}, { rejectWithValue }) => {
try {
const response = await api_client.get(`/api/user/getAll-students`,
const response = await api_client.get(`${user}getAll-students`,
{params:data}
)
console.log('this is finded students',response.data.data)
Expand Down
3 changes: 2 additions & 1 deletion src/redux/store/actions/admin/getRequestsAction.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { user } from "@/common/endPoint";
import { api_client } from "../../../../axios";
import { createAsyncThunk } from "@reduxjs/toolkit";
import { AxiosError } from "axios";
Expand All @@ -6,7 +7,7 @@ export const getRequestAction = createAsyncThunk(
'user/getAll-requests',
async ( data:{page?:number,limit?:number} , { rejectWithValue }) => {
try {
const response = await api_client.get(`/api/user/getAll-requests`,{params:data}
const response = await api_client.get(`${user}getAll-requests`,{params:data}
)
console.log('this is finded requests',response.data.data)

Expand Down
3 changes: 2 additions & 1 deletion src/redux/store/actions/admin/rejectRequestAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { config } from "../../../../common/configuration";
import { api_client } from "../../../../axios";
import { createAsyncThunk } from "@reduxjs/toolkit";
import { AxiosError } from "axios";
import { user } from "@/common/endPoint";


interface data {
Expand All @@ -12,7 +13,7 @@ export const rejectRequestAction = createAsyncThunk(
'user/reject-request',
async ( data : data , { rejectWithValue }) => {
try {
const response = await api_client.patch(`/api/user/reject-request`,data,config)
const response = await api_client.patch(`${user}reject-request`,data,config)

if(response.data.success){

Expand Down
3 changes: 2 additions & 1 deletion src/redux/store/actions/admin/verifyRequestAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { config } from "../../../../common/configuration";
import { api_client } from "../../../../axios";
import { createAsyncThunk } from "@reduxjs/toolkit";
import { AxiosError } from "axios";
import { user } from "@/common/endPoint";


interface data {
Expand All @@ -12,7 +13,7 @@ export const verifyRequestAction = createAsyncThunk(
'user/verify-request',
async ( data : data , { rejectWithValue }) => {
try {
const response = await api_client.patch(`/api/user/verify-request`,data,config)
const response = await api_client.patch(`${user}verify-request`,data,config)

if(response.data.success){

Expand Down

0 comments on commit 123fa1e

Please sign in to comment.