|
|
@@ -23,15 +23,24 @@ const axiosInstance = axios.create({
|
|
|
}
|
|
|
})
|
|
|
|
|
|
-const appId = 'GftmoIruy8mkX4Z5'
|
|
|
-const secret = 'mayzg1xAsHoNaPuF5bXEkpqkAF6vPaRN'
|
|
|
-const publicKey = `-----BEGIN PUBLIC KEY-----
|
|
|
+const appId_sz = 'GftmoIruy8mkX4Z5'
|
|
|
+const secret_sz = 'mayzg1xAsHoNaPuF5bXEkpqkAF6vPaRN'
|
|
|
+const publicKey_sz = `-----BEGIN PUBLIC KEY-----
|
|
|
MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAIzEZG2iwnFrvOLVCtI7F
|
|
|
SsMKmVx/
|
|
|
BtY2iVgDNGt1PfgSwFMfHhwJ28fvO+FuuA7SlmmwLEw3KqjRiuUXrnh
|
|
|
ph0CAwEAAQ==
|
|
|
-----END PUBLIC KEY-----`
|
|
|
|
|
|
+const appId_xs = 'E91kBs3VKmS7Aepp'
|
|
|
+const secret_xs = 'YAAk0H2JN6vwNzD3wwHh1xfZdRkFWp3r'
|
|
|
+const publicKey_xs = `-----BEGIN PUBLIC KEY-----
|
|
|
+MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAOPBRF3HaQ0djP16AuA2d
|
|
|
+eyOjnjCugJ+/
|
|
|
+ixOby6SgVxLiJQf2sbgDJKUg84UUpf2EJx7wMcO9zboLmxsSMVYGp8C
|
|
|
+AwEAAQ==
|
|
|
+-----END PUBLIC KEY-----`
|
|
|
+
|
|
|
const axiosInstanceV2 = axios.create({
|
|
|
baseURL: 'http://8.218.211.187/screenApi/',
|
|
|
headers: {
|
|
|
@@ -207,7 +216,10 @@ export class PhoneListService {
|
|
|
return phones
|
|
|
}
|
|
|
|
|
|
- async screenPhoneNumberV2(file: Express.Multer.File, listId: number): Promise<string[]> {
|
|
|
+ async screenPhoneNumberV2(file: Express.Multer.File, listId: number, flag: number): Promise<string[]> {
|
|
|
+ const appId = flag === 1 ? appId_sz : appId_xs
|
|
|
+ const secret = flag === 1 ? secret_sz : secret_xs
|
|
|
+ const publicKey = flag === 1 ? publicKey_sz : publicKey_xs
|
|
|
const fileRes = await this.fileService.upload(file)
|
|
|
if (!fileRes.url) {
|
|
|
throw new ServiceUnavailableException(`File upload error!`)
|