summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/SearchService.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-08-16 17:51:28 +0900
committerGitHub <noreply@github.com>2023-08-16 17:51:28 +0900
commit792622aeadf3e36d50cddec3c64b2ff0105ea927 (patch)
treec42a71da86be3c33e2752b4c673e280b1158e57b /packages/backend/src/core/SearchService.ts
parentbuild(deps): bump actions/setup-node from 3.7.0 to 3.8.0 (#11726) (diff)
downloadsharkey-792622aeadf3e36d50cddec3c64b2ff0105ea927.tar.gz
sharkey-792622aeadf3e36d50cddec3c64b2ff0105ea927.tar.bz2
sharkey-792622aeadf3e36d50cddec3c64b2ff0105ea927.zip
refactor: prefix Mi for all entities (#11719)
* wip * wip * wip * wip * Update RepositoryModule.ts * wip * wip * wip * Revert "wip" This reverts commit c1c13b37d2aaf3c65bc148212da302b0eb7868bf.
Diffstat (limited to 'packages/backend/src/core/SearchService.ts')
-rw-r--r--packages/backend/src/core/SearchService.ts20
1 files changed, 10 insertions, 10 deletions
diff --git a/packages/backend/src/core/SearchService.ts b/packages/backend/src/core/SearchService.ts
index 88b368dd22..ce80744c6d 100644
--- a/packages/backend/src/core/SearchService.ts
+++ b/packages/backend/src/core/SearchService.ts
@@ -8,8 +8,8 @@ import { In } from 'typeorm';
import { DI } from '@/di-symbols.js';
import type { Config } from '@/config.js';
import { bindThis } from '@/decorators.js';
-import { Note } from '@/models/entities/Note.js';
-import { User } from '@/models/index.js';
+import { MiNote } from '@/models/entities/Note.js';
+import { MiUser } from '@/models/index.js';
import type { NotesRepository } from '@/models/index.js';
import { sqlLikeEscape } from '@/misc/sql-like-escape.js';
import { QueryService } from '@/core/QueryService.js';
@@ -105,7 +105,7 @@ export class SearchService {
}
@bindThis
- public async indexNote(note: Note): Promise<void> {
+ public async indexNote(note: MiNote): Promise<void> {
if (note.text == null && note.cw == null) return;
if (!['home', 'public'].includes(note.visibility)) return;
@@ -141,7 +141,7 @@ export class SearchService {
}
@bindThis
- public async unindexNote(note: Note): Promise<void> {
+ public async unindexNote(note: MiNote): Promise<void> {
if (!['home', 'public'].includes(note.visibility)) return;
if (this.meilisearch) {
@@ -150,15 +150,15 @@ export class SearchService {
}
@bindThis
- public async searchNote(q: string, me: User | null, opts: {
- userId?: Note['userId'] | null;
- channelId?: Note['channelId'] | null;
+ public async searchNote(q: string, me: MiUser | null, opts: {
+ userId?: MiNote['userId'] | null;
+ channelId?: MiNote['channelId'] | null;
host?: string | null;
}, pagination: {
- untilId?: Note['id'];
- sinceId?: Note['id'];
+ untilId?: MiNote['id'];
+ sinceId?: MiNote['id'];
limit?: number;
- }): Promise<Note[]> {
+ }): Promise<MiNote[]> {
if (this.meilisearch) {
const filter: Q = {
op: 'and',