@@ -42,7 +42,7 @@ export const create = action({
4242 To : args . to ,
4343 Body : args . body ,
4444 StatusCallback : args . status_callback ,
45- } ,
45+ }
4646 ) ;
4747 // store some properties as fields and the rest as a nested object
4848 const databaseMessage = convertToDatabaseMessage ( message ) ;
@@ -83,9 +83,9 @@ export const list = query({
8383 ctx . db
8484 . query ( "messages" )
8585 . withIndex ( "by_account_sid" , ( q ) =>
86- q . eq ( "account_sid" , args . account_sid ) ,
86+ q . eq ( "account_sid" , args . account_sid )
8787 ) ,
88- args . limit ,
88+ args . limit
8989 ) ;
9090 } ,
9191} ) ;
@@ -101,9 +101,9 @@ export const listIncoming = query({
101101 ctx . db
102102 . query ( "messages" )
103103 . withIndex ( "by_account_sid_and_direction" , ( q ) =>
104- q . eq ( "account_sid" , args . account_sid ) . eq ( "direction" , "inbound" ) ,
104+ q . eq ( "account_sid" , args . account_sid ) . eq ( "direction" , "inbound" )
105105 ) ,
106- args . limit ,
106+ args . limit
107107 ) ;
108108 } ,
109109} ) ;
@@ -118,9 +118,9 @@ export const listOutgoing = query({
118118 ctx . db
119119 . query ( "messages" )
120120 . withIndex ( "by_account_sid_and_direction" , ( q ) =>
121- q . eq ( "account_sid" , args . account_sid ) . eq ( "direction" , "outbound-api" ) ,
121+ q . eq ( "account_sid" , args . account_sid ) . eq ( "direction" , "outbound-api" )
122122 ) ,
123- args . limit ,
123+ args . limit
124124 ) ;
125125 } ,
126126} ) ;
@@ -135,7 +135,7 @@ export const getBySid = query({
135135 const message = await ctx . db
136136 . query ( "messages" )
137137 . withIndex ( "by_sid" , ( q ) =>
138- q . eq ( "account_sid" , args . account_sid ) . eq ( "sid" , args . sid ) ,
138+ q . eq ( "account_sid" , args . account_sid ) . eq ( "sid" , args . sid )
139139 )
140140 . first ( ) ;
141141 return message && withoutSystemFields ( message ) ;
@@ -154,9 +154,9 @@ export const getTo = query({
154154 ctx . db
155155 . query ( "messages" )
156156 . withIndex ( "by_to" , ( q ) =>
157- q . eq ( "account_sid" , args . account_sid ) . eq ( "to" , args . to ) ,
157+ q . eq ( "account_sid" , args . account_sid ) . eq ( "to" , args . to )
158158 ) ,
159- args . limit ,
159+ args . limit
160160 ) ;
161161 } ,
162162} ) ;
@@ -173,9 +173,9 @@ export const getFrom = query({
173173 ctx . db
174174 . query ( "messages" )
175175 . withIndex ( "by_from" , ( q ) =>
176- q . eq ( "account_sid" , args . account_sid ) . eq ( "from" , args . from ) ,
176+ q . eq ( "account_sid" , args . account_sid ) . eq ( "from" , args . from )
177177 ) ,
178- args . limit ,
178+ args . limit
179179 ) ;
180180 } ,
181181} ) ;
@@ -194,9 +194,9 @@ export const getByCounterparty = query({
194194 . withIndex ( "by_counterparty" , ( q ) =>
195195 q
196196 . eq ( "account_sid" , args . account_sid )
197- . eq ( "counterparty" , args . counterparty ) ,
197+ . eq ( "counterparty" , args . counterparty )
198198 ) ,
199- args . limit ,
199+ args . limit
200200 ) ;
201201 } ,
202202} ) ;
@@ -212,7 +212,7 @@ export const updateStatus = mutation({
212212 const message = await ctx . db
213213 . query ( "messages" )
214214 . withIndex ( "by_sid" , ( q ) =>
215- q . eq ( "account_sid" , args . account_sid ) . eq ( "sid" , args . sid ) ,
215+ q . eq ( "account_sid" , args . account_sid ) . eq ( "sid" , args . sid )
216216 )
217217 . first ( ) ;
218218 if ( ! message ) {
@@ -236,7 +236,7 @@ export const getFromTwilioBySidAndInsert = action({
236236 args . account_sid ,
237237 args . auth_token ,
238238 { } ,
239- "GET" ,
239+ "GET"
240240 ) ;
241241 const databaseMessage = convertToDatabaseMessage ( message ) ;
242242 return ctx . runMutation ( internal . messages . insert , {
@@ -300,7 +300,7 @@ function convertToDatabaseMessage(message: any) {
300300
301301async function takeOrCollectFields (
302302 query : Query < NamedTableInfo < DataModel , "messages" > > ,
303- limit : number | undefined ,
303+ limit : number | undefined
304304) : Promise < Message [ ] > {
305305 let messagesPromise ;
306306 if ( limit ) {
0 commit comments