Add divisions management module with database schema and validation
- Introduced `DivisionsModule` to manage organizational divisions, including read and write controllers. - Created database migrations for the `divisions` table and related constraints. - Implemented validation for division name and code with corresponding utility functions. - Added service and repository layers for handling division data operations. - Developed unit tests for the divisions service, repository, and controllers to ensure functionality and correctness. - Updated application module to include the new `ConfigurationModule` for better organization.
This commit is contained in:
@@ -45,9 +45,7 @@ describe('Privileges (e2e)', () => {
|
||||
.post('/auth/register')
|
||||
.send({ username: adminUsername, password })
|
||||
.expect(201);
|
||||
adminAccessToken = (
|
||||
adminReg.body as { accessToken: string }
|
||||
).accessToken;
|
||||
adminAccessToken = (adminReg.body as { accessToken: string }).accessToken;
|
||||
|
||||
const adminMe = await request(app.getHttpServer())
|
||||
.get('/auth/me')
|
||||
@@ -63,9 +61,7 @@ describe('Privileges (e2e)', () => {
|
||||
.post('/auth/register')
|
||||
.send({ username: otherUsername, password })
|
||||
.expect(201);
|
||||
otherAccessToken = (
|
||||
otherReg.body as { accessToken: string }
|
||||
).accessToken;
|
||||
otherAccessToken = (otherReg.body as { accessToken: string }).accessToken;
|
||||
const otherMe = await request(app.getHttpServer())
|
||||
.get('/auth/me')
|
||||
.set('Authorization', `Bearer ${otherAccessToken}`)
|
||||
|
||||
Reference in New Issue
Block a user