Skip to content

Commit

Permalink
fix: typo (#577)
Browse files Browse the repository at this point in the history
close #576
  • Loading branch information
sy-records authored Nov 1, 2023
1 parent a458f34 commit bf556fb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ui/src/components/Operate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
deleteAnswer,
editCheck,
reopenQuestion,
questionOpetation,
questionOperation,
unDeleteAnswer,
unDeleteQuestion,
} from '@/services';
Expand Down Expand Up @@ -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' });
Expand Down
4 changes: 2 additions & 2 deletions ui/src/pages/Questions/Ask/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import {
useQueryRevisions,
useQueryQuestionByTitle,
getTagsBySlugName,
saveQuestionWidthAnaser,
saveQuestionWithAnswer,
} from '@/services';
import { handleFormError, SaveDraft, storageExpires } from '@/utils';
import { pathFactory } from '@/router/pathFactory';
Expand Down Expand Up @@ -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) => {
Expand Down
4 changes: 2 additions & 2 deletions ui/src/services/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

Expand Down

0 comments on commit bf556fb

Please sign in to comment.