feat: complete publish test logic
This commit is contained in:
@@ -8,6 +8,7 @@ import { filterTests } from '../helpers/filter-tests.helper';
|
||||
import Utils from '@/common/utils';
|
||||
import { Test } from '../entities/test.entity';
|
||||
import { AppException } from '@/common/exceptions/app.exception';
|
||||
import { TestStatus } from '../enums/test-status.enum';
|
||||
|
||||
@Injectable()
|
||||
export class TestsQueryProvider {
|
||||
@@ -49,7 +50,7 @@ export class TestsQueryProvider {
|
||||
public async findAllForUser() {
|
||||
try {
|
||||
return await this.testRepository.find({
|
||||
where: { isActive: true },
|
||||
where: { isActive: true, status: TestStatus.PUBLISHED },
|
||||
select: {
|
||||
id: true,
|
||||
accessType: true,
|
||||
|
||||
Reference in New Issue
Block a user