You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by sh...@apache.org on 2023/11/01 07:01:08 UTC
(incubator-answer) branch main updated: fix: typo (#577)
This is an automated email from the ASF dual-hosted git repository.
shuai pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git
The following commit(s) were added to refs/heads/main by this push:
new bf556fb7 fix: typo (#577)
bf556fb7 is described below
commit bf556fb73dc8d5fb01f9f558b9e6ef16b8cccc6a
Author: Lu Fei <52...@qq52o.cn>
AuthorDate: Wed Nov 1 02:01:04 2023 -0500
fix: typo (#577)
close #576
---
ui/src/components/Operate/index.tsx | 4 ++--
ui/src/pages/Questions/Ask/index.tsx | 4 ++--
ui/src/services/common.ts | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/ui/src/components/Operate/index.tsx b/ui/src/components/Operate/index.tsx
index 57d513ed..18ce6a22 100644
--- a/ui/src/components/Operate/index.tsx
+++ b/ui/src/components/Operate/index.tsx
@@ -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' });
diff --git a/ui/src/pages/Questions/Ask/index.tsx b/ui/src/pages/Questions/Ask/index.tsx
index 8b787314..49f462f5 100644
--- a/ui/src/pages/Questions/Ask/index.tsx
+++ b/ui/src/pages/Questions/Ask/index.tsx
@@ -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) => {
diff --git a/ui/src/services/common.ts b/ui/src/services/common.ts
index f6fbf613..f4efca73 100644
--- a/ui/src/services/common.ts
+++ b/ui/src/services/common.ts
@@ -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);
};