Skip to content

Commit

Permalink
style(scirpt): change CommonProject.script.apps.searchAnswer => searc…
Browse files Browse the repository at this point in the history
…hAnswerInCaches
  • Loading branch information
enncy committed May 8, 2023
1 parent c9bc7ad commit a193549
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/scripts/src/projects/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ export const CommonProject = Project.create({
* @param title 题目
* @param whenSearchEmpty 当搜索结果为空,或者题库缓存功能被关闭时执行的函数
*/
searchAnswer: async (
searchAnswerInCaches: async (
title: string,
whenSearchEmpty: () => SearchInformation[] | Promise<SearchInformation[]>
): Promise<SearchInformation[]> => {
Expand Down
4 changes: 2 additions & 2 deletions packages/scripts/src/projects/cx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ export function workOrExam(
// 处理作业和考试题目
const title = workOrExamQuestionTitleTransform(elements.title);
if (title) {
return CommonProject.scripts.apps.methods.searchAnswer(title, () => {
return CommonProject.scripts.apps.methods.searchAnswerInCaches(title, () => {
return defaultAnswerWrapperHandler(answererWrappers, {
type,
title,
Expand Down Expand Up @@ -1418,7 +1418,7 @@ async function chapterTestTask(
answerer: (elements, type, ctx) => {
const title = chapterTestTaskQuestionTitleTransform(elements.title);
if (title) {
return CommonProject.scripts.apps.methods.searchAnswer(title, () => {
return CommonProject.scripts.apps.methods.searchAnswerInCaches(title, () => {
return defaultAnswerWrapperHandler(answererWrappers, {
type,
title,
Expand Down
2 changes: 1 addition & 1 deletion packages/scripts/src/projects/icve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ function work({ answererWrappers, period, thread }: CommonWorkOptions) {
answerer: (elements, type, ctx) => {
const title = titleTransform(elements.title);
if (title) {
return CommonProject.scripts.apps.methods.searchAnswer(title, () => {
return CommonProject.scripts.apps.methods.searchAnswerInCaches(title, () => {
return defaultAnswerWrapperHandler(answererWrappers, {
type,
title,
Expand Down
4 changes: 2 additions & 2 deletions packages/scripts/src/projects/zhs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ function gxkWorkOrExam(
answerer: (elements, type, ctx) => {
const title = titleTransform(elements.title);
if (title) {
return CommonProject.scripts.apps.methods.searchAnswer(title, () => {
return CommonProject.scripts.apps.methods.searchAnswerInCaches(title, () => {
return defaultAnswerWrapperHandler(answererWrappers, {
type,
title,
Expand Down Expand Up @@ -1120,7 +1120,7 @@ function xnkWork({ answererWrappers, period, thread }: CommonWorkOptions) {
answerer: (elements, type, ctx) => {
const title = titleTransform(elements.title);
if (title) {
return CommonProject.scripts.apps.methods.searchAnswer(title, () => {
return CommonProject.scripts.apps.methods.searchAnswerInCaches(title, () => {
return defaultAnswerWrapperHandler(answererWrappers, {
type,
title,
Expand Down

0 comments on commit a193549

Please sign in to comment.