diff --git a/client/src/Services/userService.js b/client/src/Services/userService.js index e69de29..a68d726 100644 --- a/client/src/Services/userService.js +++ b/client/src/Services/userService.js @@ -0,0 +1,29 @@ +import thaliaAPI from "../API/thaliaAPI"; + +export const getUsers = async () => { + try { + const response = await thaliaAPI.get("/admin/users", { withCredentials: true }); + return response.data; + } catch (error) { + return error; + } +} + +export const blockUser = async (userId) => { + try { + const response = await thaliaAPI.put(`/admin/users/block/${userId}`, { withCredentials: true }); + return response.data; + } catch (error) { + return error; + } +} + +export const unBlockUser = async (userId) => { + try { + const response = await thaliaAPI.put(`/admin/users/unblock/${userId}`, { withCredentials: true }); + return response.data; + } catch (error) { + return error; + } +} + diff --git a/client/src/components/AddBody/AddBody.jsx b/client/src/components/AddBody/AddBody.jsx index bd9c9f6..760184f 100644 --- a/client/src/components/AddBody/AddBody.jsx +++ b/client/src/components/AddBody/AddBody.jsx @@ -40,7 +40,7 @@ function AddBody({ openModal, setOpenModal }) {

Name of the Topic

- - - diff --git a/client/src/pages/AdminPages/MyBody/MyBody.jsx b/client/src/pages/AdminPages/MyBody/MyBody.jsx index f870ed8..afdd993 100644 --- a/client/src/pages/AdminPages/MyBody/MyBody.jsx +++ b/client/src/pages/AdminPages/MyBody/MyBody.jsx @@ -56,7 +56,7 @@ function MyBody() { bodyDetails={editBody ? editBody : null} /> -
+
{/* Text Components */}