|
|
@@ -2,7 +2,7 @@ import {
|
|
|
Body,
|
|
|
Controller,
|
|
|
Delete,
|
|
|
- Get,
|
|
|
+ Get, InternalServerErrorException,
|
|
|
Param,
|
|
|
Post,
|
|
|
Put,
|
|
|
@@ -66,6 +66,11 @@ export class PhoneListController {
|
|
|
.split('\n')
|
|
|
.map((phone) => phone.trim().replaceAll(' ', ''))
|
|
|
.filter((phone) => phone.length > 0 && /^\+?\d+$/.test(phone))
|
|
|
+
|
|
|
+ if (phones.length < 100) {
|
|
|
+ throw new InternalServerErrorException('导入失败,导入条数不能少于100条!')
|
|
|
+ }
|
|
|
+
|
|
|
await this.phoneListService.importList(parseInt(id), phones)
|
|
|
}
|
|
|
|