-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into BC-5583-display-pdf-preview
- Loading branch information
Showing
132 changed files
with
2,653 additions
and
3,870 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
export * from './brute-force.error'; | ||
export * from './ldap-connection.error'; | ||
export * from './school-in-migration.error'; | ||
export * from './unauthorized.loggable-exception'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export { ICurrentUser } from './interface'; | ||
export { JWT, CurrentUser, Authenticate } from './decorator'; | ||
export { AuthenticationModule } from './authentication.module'; | ||
export { AuthenticationService } from './services'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './school-in-migration.loggable-exception'; |
24 changes: 24 additions & 0 deletions
24
...server/src/modules/authentication/loggable/school-in-migration.loggable-exception.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { SchoolInMigrationLoggableException } from './school-in-migration.loggable-exception'; | ||
|
||
describe(SchoolInMigrationLoggableException.name, () => { | ||
describe('getLogMessage', () => { | ||
const setup = () => { | ||
const exception = new SchoolInMigrationLoggableException(); | ||
|
||
return { | ||
exception, | ||
}; | ||
}; | ||
|
||
it('should return the correct log message', () => { | ||
const { exception } = setup(); | ||
|
||
const message = exception.getLogMessage(); | ||
|
||
expect(message).toEqual({ | ||
type: 'SCHOOL_IN_MIGRATION', | ||
stack: expect.any(String), | ||
}); | ||
}); | ||
}); | ||
}); |
15 changes: 11 additions & 4 deletions
15
...ation/errors/school-in-migration.error.ts → ...school-in-migration.loggable-exception.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
import { HttpStatus } from '@nestjs/common'; | ||
import { BusinessError } from '@shared/common'; | ||
import { ErrorLogMessage, Loggable } from '@src/core/logger'; | ||
|
||
export class SchoolInMigrationError extends BusinessError { | ||
constructor(details?: Record<string, unknown>) { | ||
export class SchoolInMigrationLoggableException extends BusinessError implements Loggable { | ||
constructor() { | ||
super( | ||
{ | ||
type: 'SCHOOL_IN_MIGRATION', | ||
title: 'Login failed because school is in migration', | ||
defaultMessage: 'Login failed because creation of user is not possible during migration', | ||
}, | ||
HttpStatus.UNAUTHORIZED, | ||
details | ||
HttpStatus.UNAUTHORIZED | ||
); | ||
} | ||
|
||
getLogMessage(): ErrorLogMessage { | ||
return { | ||
type: this.type, | ||
stack: this.stack, | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './ldap.service'; | ||
export * from './authentication.service'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
apps/server/src/modules/legacy-school/controller/dto/index.ts
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
apps/server/src/modules/legacy-school/controller/dto/migration.body.ts
This file was deleted.
Oops, something went wrong.
40 changes: 0 additions & 40 deletions
40
apps/server/src/modules/legacy-school/controller/dto/migration.response.ts
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
apps/server/src/modules/legacy-school/controller/dto/school.params.ts
This file was deleted.
Oops, something went wrong.
94 changes: 0 additions & 94 deletions
94
apps/server/src/modules/legacy-school/controller/legacy-school.controller.spec.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.