Skip to content

Commit f571a82

Browse files
committed
fix: removing removables and upping to 100
1 parent 84ffed8 commit f571a82

4 files changed

Lines changed: 2 additions & 68 deletions

File tree

api/src/controllers/listing.controller.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,6 @@ export class ListingController {
9292
return await this.listingService.list(queryParams);
9393
}
9494

95-
// TODO: REMOVE THIS
96-
@Get('makeusers')
97-
@ApiOperation({
98-
summary: 'make users',
99-
operationId: 'makeusers',
100-
})
101-
@UsePipes(new ValidationPipe(defaultValidationPipeOptions))
102-
@UseInterceptors(ClassSerializerInterceptor)
103-
@ApiOkResponse({ type: PaginatedListingDto })
104-
public async makeUsers() {
105-
return await this.listingService.makeUsers();
106-
}
107-
10895
@Post('list')
10996
@ApiOperation({
11097
summary: 'Get a paginated set of listings',

api/src/services/listing.service.ts

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ import { doJurisdictionHaveFeatureFlagSet } from '../utilities/feature-flag-util
6868
import { addUnitGroupsSummarized } from '../utilities/unit-groups-transformations';
6969
import { ListingMultiselectQuestion } from '../dtos/listings/listing-multiselect-question.dto';
7070
import { SnapshotCreateService } from './snapshot-create.service';
71-
import { userFactory } from '../../prisma/seed-helpers/user-factory';
7271

7372
dayjs.extend(utc);
7473
dayjs.extend(tz);
@@ -3001,7 +3000,7 @@ export class ListingService implements OnModuleInit {
30013000
},
30023001
],
30033002
},
3004-
take: 10,
3003+
take: 100,
30053004
});
30063005

30073006
if (!emailUsers.length) {
@@ -3406,28 +3405,4 @@ export class ListingService implements OnModuleInit {
34063405
} as ListingMapMarker;
34073406
});
34083407
}
3409-
3410-
async makeUsers() {
3411-
const juris = await this.prisma.jurisdictions.findMany({
3412-
select: {
3413-
id: true,
3414-
name: true,
3415-
},
3416-
});
3417-
for (let i = 0; i < 10000; i++) {
3418-
await this.prisma.userAccounts.create({
3419-
data: await userFactory({
3420-
email: `yazeed.loonat+${i}@exygy.com`,
3421-
confirmedAt: new Date(),
3422-
jurisdictionIds: juris.map((elem) => elem.id),
3423-
acceptedTerms: true,
3424-
password: 'abcdef',
3425-
notificationPreferences: {
3426-
regions: ['Eastside'],
3427-
},
3428-
userPreferences: true,
3429-
}),
3430-
});
3431-
}
3432-
}
34333408
}

shared-helpers/src/types/backend-swagger.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -252,18 +252,6 @@ export class ListingsService {
252252
axios(configs, resolve, reject)
253253
})
254254
}
255-
/**
256-
* make users
257-
*/
258-
makeusers(options: IRequestOptions = {}): Promise<PaginatedListing> {
259-
return new Promise((resolve, reject) => {
260-
let url = basePath + "/listings/makeusers"
261-
262-
const configs: IRequestConfig = getConfigs("get", "application/json", url, options)
263-
264-
axios(configs, resolve, reject)
265-
})
266-
}
267255
/**
268256
* Get a paginated set of listings
269257
*/

0 commit comments

Comments
 (0)