fix: typo (#577)

close #576
This commit is contained in:
Lu Fei
2023-11-01 02:01:04 -05:00
committed by GitHub
parent a458f3409c
commit bf556fb73d
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -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' });
+2 -2
View File
@@ -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) => {
+2 -2
View File
@@ -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);
};