fix(docker): MinIO healthcheck curl probe + Redis password in .env.example
- Change MinIO healthcheck from `mc ready local` to curl-based probe (`curl -sf http://localhost:9000/minio/health/live`) in both docker-compose.yml and docker-compose.prod.yml, matching the approach already used in docker-compose.ci.yml - Add descriptive placeholder for REDIS_PASSWORD in .env.example (was empty, now has CHANGE_ME_IN_PRODUCTION reminder) Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
||||
import { inquiriesApi, type ListInquiriesParams } from '@/lib/inquiries-api';
|
||||
import { inquiriesApi, type ListInquiriesParams, type CreateInquiryDto } from '@/lib/inquiries-api';
|
||||
|
||||
export const inquiriesKeys = {
|
||||
all: ['inquiries'] as const,
|
||||
@@ -32,3 +32,16 @@ export function useMarkInquiryRead() {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export function useCreateInquiry() {
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation({
|
||||
mutationFn: (data: CreateInquiryDto) => inquiriesApi.create(data),
|
||||
onSuccess: (_data, variables) => {
|
||||
queryClient.invalidateQueries({ queryKey: inquiriesKeys.all });
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: inquiriesKeys.byListing(variables.listingId, {}),
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -15,6 +15,12 @@ export interface InquiryReadDto {
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export interface CreateInquiryDto {
|
||||
listingId: string;
|
||||
message: string;
|
||||
phone: string;
|
||||
}
|
||||
|
||||
export interface PaginatedResult<T> {
|
||||
data: T[];
|
||||
total: number;
|
||||
@@ -56,4 +62,8 @@ export const inquiriesApi = {
|
||||
/** Mark an inquiry as read */
|
||||
markAsRead: (id: string) =>
|
||||
apiClient.patch<{ success: boolean }>(`/inquiries/${id}/read`),
|
||||
|
||||
/** Create a new inquiry for a listing */
|
||||
create: (data: CreateInquiryDto) =>
|
||||
apiClient.post<InquiryReadDto>('/inquiries', data),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user