@@ -31,7 +31,7 @@ import {
|
||||
deleteAnswer,
|
||||
editCheck,
|
||||
reopenQuestion,
|
||||
questionOpetation,
|
||||
questionOperation,
|
||||
unDeleteAnswer,
|
||||
unDeleteQuestion,
|
||||
} from '@/services';
|
||||
@@ -219,7 +219,7 @@ const Index: FC<IProps> = ({
|
||||
};
|
||||
|
||||
const handleCommon = async (params) => {
|
||||
await questionOpetation(params);
|
||||
await questionOperation(params);
|
||||
let msg = '';
|
||||
if (params.operation === 'pin') {
|
||||
msg = t('post_pin', { keyPrefix: 'messages' });
|
||||
|
||||
@@ -37,7 +37,7 @@ import {
|
||||
useQueryRevisions,
|
||||
useQueryQuestionByTitle,
|
||||
getTagsBySlugName,
|
||||
saveQuestionWidthAnaser,
|
||||
saveQuestionWithAnswer,
|
||||
} from '@/services';
|
||||
import { handleFormError, SaveDraft, storageExpires } from '@/utils';
|
||||
import { pathFactory } from '@/router/pathFactory';
|
||||
@@ -310,7 +310,7 @@ const Ask = () => {
|
||||
}
|
||||
let res;
|
||||
if (checked) {
|
||||
res = await saveQuestionWidthAnaser({
|
||||
res = await saveQuestionWithAnswer({
|
||||
...params,
|
||||
answer_content: formData.answer_content.value,
|
||||
}).catch((err) => {
|
||||
|
||||
@@ -301,11 +301,11 @@ export const markdownToHtml = (content: string) => {
|
||||
return request.post(apiUrl, { content });
|
||||
};
|
||||
|
||||
export const saveQuestionWidthAnaser = (params: Type.QuestionWithAnswer) => {
|
||||
export const saveQuestionWithAnswer = (params: Type.QuestionWithAnswer) => {
|
||||
return request.post('/answer/api/v1/question/answer', params);
|
||||
};
|
||||
|
||||
export const questionOpetation = (params: Type.QuestionOperationReq) => {
|
||||
export const questionOperation = (params: Type.QuestionOperationReq) => {
|
||||
return request.put('/answer/api/v1/question/operation', params);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user