add question
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user