mirror of
https://github.com/vernu/textbee.git
synced 2026-05-08 15:44:50 -04:00
chore(api): update sms batch schema
This commit is contained in:
@@ -111,10 +111,8 @@ export class GatewayService {
|
||||
smsBatch = await this.smsBatchModel.create({
|
||||
device: device._id,
|
||||
message,
|
||||
metadata: {
|
||||
recipientCount: recipients.length,
|
||||
recipientPreview: this.getRecipientsPreview(recipients),
|
||||
},
|
||||
recipientCount: recipients.length,
|
||||
recipientPreview: this.getRecipientsPreview(recipients),
|
||||
})
|
||||
} catch (e) {
|
||||
throw new HttpException(
|
||||
|
||||
@@ -14,6 +14,18 @@ export class SMSBatch {
|
||||
@Prop({ type: String })
|
||||
message: string
|
||||
|
||||
@Prop({ type: Boolean, default: false })
|
||||
encrypted: boolean
|
||||
|
||||
@Prop({ type: String })
|
||||
encryptedMessage: string
|
||||
|
||||
@Prop({ type: Number })
|
||||
recipientCount: number
|
||||
|
||||
@Prop({ type: String })
|
||||
recipientPreview: string
|
||||
|
||||
// misc metadata for debugging
|
||||
@Prop({ type: Object })
|
||||
metadata: Record<string, any>
|
||||
|
||||
Reference in New Issue
Block a user