diff --git a/packages/velog-server/src/services/TagService/index.ts b/packages/velog-server/src/services/TagService/index.ts index 47fc97a4..f0e8e3ab 100644 --- a/packages/velog-server/src/services/TagService/index.ts +++ b/packages/velog-server/src/services/TagService/index.ts @@ -38,9 +38,10 @@ export class TagService implements Service { }) } public async findByName(name: string): Promise { - return await this.db.tag.findUnique({ + const filtered = this.utils.escapeForUrl(name).toLowerCase() + return await this.db.tag.findFirst({ where: { - name, + OR: [{ name_filtered: filtered }, { name: name }], }, }) }