add user module and jwt

This commit is contained in:
2025-06-22 17:12:45 +08:00
parent 6fa6e1f076
commit b8cc65a768
16 changed files with 266 additions and 27 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
import { IsUUID, IsDefined } from 'class-validator';
import { IsDefined, IsUUID } from 'class-validator';
import { DtoValidation } from '@/modules/core/decorator/dto.validation.decorator';
@@ -1,4 +1,5 @@
import { Exclude, Expose, Type } from 'class-transformer';
import type { Relation } from 'typeorm';
import {
BaseEntity,
Column,
@@ -10,8 +11,6 @@ import {
TreeParent,
} from 'typeorm';
import type { Relation } from 'typeorm';
import { PostEntity } from '@/modules/content/entities/post.entity';
@Exclude()
+1 -1
View File
@@ -1,6 +1,6 @@
import { Exclude, Expose } from 'class-transformer';
import { Column, Entity, ManyToMany, PrimaryColumn } from 'typeorm';
import type { Relation } from 'typeorm';
import { Column, Entity, ManyToMany, PrimaryColumn } from 'typeorm';
import { PostEntity } from '@/modules/content/entities/post.entity';
@@ -8,6 +8,7 @@ import { QueryHook } from '@/modules/database/types';
type FindCommentTreeOptions = FindTreeOptions & {
addQuery?: QueryHook<CommentEntity>;
};
@CustomRepository(CommentEntity)
export class CommentRepository extends BaseTreeRepository<CommentEntity> {
protected _qbName = 'comment';
@@ -4,6 +4,7 @@ import { deepMerge } from '@/modules/core/helpers';
export class SanitizeService {
protected config: sanitizeHtml.IOptions = {};
constructor() {
this.config = {
allowedTags: sanitizeHtml.defaults.allowedTags.concat(['img', 'code']),