This commit is contained in:
omkieit 2024-09-16 20:39:26 +05:30
parent 97e3d6c3ab
commit 9f9882aee3
4 changed files with 19 additions and 14 deletions

File diff suppressed because one or more lines are too long

View File

@ -42,7 +42,7 @@
<!-- <script src="https://stackpath.bootstrapcdn.com/bootstrap/5.1.3/js/bootstrap.bundle.min.js"></script> -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/js/bootstrap.bundle.min.js"></script>
<script type="module" crossorigin src="/assets/index-BVD7tRJW.js"></script>
<script type="module" crossorigin src="/assets/index-BG_-nKQh.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-BrT2kTNU.css">
</head>

View File

@ -21,6 +21,11 @@ export const signIn = (formData) => API.post("/users/signin", formData);
export const verifyEmail = (id, token, data) => API.get(`/users/${id}/verify/${token}`, data);
export const submitProperty = (propertyData) => API.post("/properties", propertyData);
export const fetchUserProperties = (userId) => API.get(`/properties/user/${userId}`, userId);
export const fetchPropertyById = (id) => API.get(`/properties/${id}`, id);

View File

@ -31,7 +31,7 @@ export const fetchPropertyById = createAsyncThunk(
"property/fetchPropertyById",
async (id, { rejectWithValue }) => {
try {
const response = await axios.get(`http://localhost:3002/properties/${id}`);
const response = await api.fetchPropertyById(id);
return response.data;
} catch (error) {
return rejectWithValue(error.response.data);