done
This commit is contained in:
parent
97e3d6c3ab
commit
9f9882aee3
File diff suppressed because one or more lines are too long
|
@ -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>
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue