Skip to content

Commit

Permalink
fix(be): 🐛 assets of bull board not found
Browse files Browse the repository at this point in the history
[docker-latest]
  • Loading branch information
lehuygiang28 committed Jul 1, 2024
1 parent 10f4117 commit 2579453
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions apps/be/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ export class AppModule {
.apply(
jobQueueUIMiddleware(
this.redisService.getClient,
this.configService.get('app.globalPrefix', { infer: true }) ?? '',
this.configService.getOrThrow('app.globalPrefix', { infer: true }),
),
)
.forRoutes('/admin/queues');
.forRoutes('admin/queues');
}
}
6 changes: 3 additions & 3 deletions apps/be/src/app/middlewares/job-queues.middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import {
BULLMQ_BG_JOB_QUEUE,
} from '~be/common/bullmq/bullmq.constant';

export function jobQueueUIMiddleware(connection: Redis, globalPrefix?: string) {
export function jobQueueUIMiddleware(connection: Redis, globalPrefix = '') {
const serverAdapter = new ExpressAdapter();
serverAdapter.setBasePath(`${globalPrefix ?? globalPrefix + '/'}/admin/queues`);
const basePath = `${globalPrefix ? '/' + globalPrefix : ''}/admin/queues`;
serverAdapter.setBasePath(basePath);

const queues = [
BULLMQ_TASK_QUEUE,
Expand All @@ -27,7 +28,6 @@ export function jobQueueUIMiddleware(connection: Redis, globalPrefix?: string) {
}),
{
readOnlyMode: true,
description: 'Task Queue',
},
),
);
Expand Down

0 comments on commit 2579453

Please sign in to comment.