add question

This commit is contained in:
hamid zarghami
2025-09-07 15:53:46 +03:30
parent 554312ddc6
commit cb5a9a8e21
6 changed files with 116 additions and 6 deletions
+9 -1
View File
@@ -1,6 +1,6 @@
import axios from "@/config/axios";
import { ProductDetailResponse } from "@/types/product.types";
import { AddCommentProps } from "../types/Types";
import { AddCommentProps, AddQuestionProps } from "../types/Types";
export const getProduct = async (
id: string
@@ -16,3 +16,11 @@ export const addComment = async (params: AddCommentProps) => {
);
return data;
};
export const addQuestion = async (params: AddQuestionProps) => {
const { data } = await axios.post(
`/product/${params.productId}/questions`,
params
);
return data;
};