@@ -246,47 +246,47 @@ export default Vue.extend({
246246 },
247247
248248 // UPDATED SINGLE DELETE
249- async deleteInboxMessage(messageId : number ): Promise <void > {
250- try {
251- await this .$http .post (" /inbox/deletemessage/" , {
252- place_id: this .$route .params .place_id ,
253- message_id: [messageId ], // <-- ALWAYS an array now
254- type: this .placeinfo [0 ].type ,
255- });
256-
257- this .success = " Message Deleted" ;
258- this .error = " " ;
259- this .display = false ;
260- } catch (error ) {
261- this .error = error .response ?.data ?.error || " Error deleting message" ;
262- this .success = " " ;
263- } finally {
264- this .getInboxMessages ();
265- }
266- },
249+ async deleteInboxMessage(messageId : number ): Promise <void > {
250+ try {
251+ await this .$http .post (" /inbox/deletemessage/" , {
252+ place_id: this .$route .params .place_id ,
253+ message_id: [messageId ], // <-- ALWAYS an array now
254+ type: this .placeinfo [0 ].type ,
255+ });
256+
257+ this .success = " Message Deleted" ;
258+ this .error = " " ;
259+ this .display = false ;
260+ } catch (error ) {
261+ this .error = error .response ?.data ?.error || " Error deleting message" ;
262+ this .success = " " ;
263+ } finally {
264+ this .getInboxMessages ();
265+ }
266+ },
267267
268268 // NEW MULTI-DELETE
269- async deleteSelected(): Promise <void > {
270- if (this .selectedMessages .length === 0 ) return ;
271-
272- try {
273- await this .$http .post (" /inbox/deletemessage/" , {
274- place_id: this .$route .params .place_id ,
275- message_id: this .selectedMessages , // <-- already an array
276- type: this .placeinfo [0 ].type ,
277- });
278-
279- this .success = " Selected messages deleted" ;
280- this .error = " " ;
281- this .display = false ;
282- } catch (error ) {
283- this .error = error .response ?.data ?.error || " Error deleting messages" ;
284- this .success = " " ;
285- } finally {
286- this .selectedMessages = [];
287- this .getInboxMessages ();
288- }
289- },
269+ async deleteSelected(): Promise <void > {
270+ if (this .selectedMessages .length === 0 ) return ;
271+
272+ try {
273+ await this .$http .post (" /inbox/deletemessage/" , {
274+ place_id: this .$route .params .place_id ,
275+ message_id: this .selectedMessages , // <-- already an array
276+ type: this .placeinfo [0 ].type ,
277+ });
278+
279+ this .success = " Selected messages deleted" ;
280+ this .error = " " ;
281+ this .display = false ;
282+ } catch (error ) {
283+ this .error = error .response ?.data ?.error || " Error deleting messages" ;
284+ this .success = " " ;
285+ } finally {
286+ this .selectedMessages = [];
287+ this .getInboxMessages ();
288+ }
289+ },
290290
291291 async getAdminInfo(): Promise <any > {
292292 return this .$http .post (" /inbox/getadmininfo" , {
0 commit comments