mirror of
https://github.com/docmost/docmost.git
synced 2025-11-16 22:21:10 +10:00
Refactoring
* Refactor workspace membership system * Create setup endpoint * Use Passport.js * Several updates and fixes
This commit is contained in:
@ -1,9 +1,14 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import {
|
||||
MiddlewareConsumer,
|
||||
Module,
|
||||
NestModule,
|
||||
RequestMethod,
|
||||
} from '@nestjs/common';
|
||||
import { UserModule } from './user/user.module';
|
||||
import { AuthModule } from './auth/auth.module';
|
||||
import { WorkspaceModule } from './workspace/workspace.module';
|
||||
import { PageModule } from './page/page.module';
|
||||
import { StorageModule } from './storage/storage.module';
|
||||
import { StorageModule } from '../integrations/storage/storage.module';
|
||||
import { AttachmentModule } from './attachment/attachment.module';
|
||||
import { EnvironmentModule } from '../environment/environment.module';
|
||||
import { CommentModule } from './comment/comment.module';
|
||||
@ -11,6 +16,7 @@ import { SearchModule } from './search/search.module';
|
||||
import { SpaceModule } from './space/space.module';
|
||||
import { GroupModule } from './group/group.module';
|
||||
import { CaslModule } from './casl/casl.module';
|
||||
import { DomainMiddleware } from '../middlewares/domain.middleware';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
@ -29,4 +35,11 @@ import { CaslModule } from './casl/casl.module';
|
||||
CaslModule,
|
||||
],
|
||||
})
|
||||
export class CoreModule {}
|
||||
export class CoreModule implements NestModule {
|
||||
configure(consumer: MiddlewareConsumer) {
|
||||
consumer
|
||||
.apply(DomainMiddleware)
|
||||
.exclude({ path: 'auth/setup', method: RequestMethod.POST })
|
||||
.forRoutes('*');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user