Cleaned code
This commit is contained in:
@@ -5,8 +5,9 @@ import {addIcons} from "ionicons";
|
||||
import {sendOutline} from 'ionicons/icons';
|
||||
import {GetGroupDetailsDto, MessagesService} from "../../services/api";
|
||||
import {firstValueFrom} from "rxjs";
|
||||
|
||||
addIcons({
|
||||
"send-outline" : sendOutline
|
||||
"send-outline": sendOutline
|
||||
})
|
||||
|
||||
@Component({
|
||||
@@ -29,7 +30,7 @@ export class MessageFormComponent {
|
||||
libelle: new FormControl<string>(null, [Validators.required]),
|
||||
})
|
||||
|
||||
async sendMessageOnGroup(){
|
||||
async sendMessageOnGroup() {
|
||||
const loading = await this.loadCtrl.create({
|
||||
message: 'Envoi...',
|
||||
spinner: 'lines-sharp-small'
|
||||
@@ -51,8 +52,7 @@ export class MessageFormComponent {
|
||||
try {
|
||||
await firstValueFrom(this.messagesService.sendMessageEndpoint(this.groupId(), this.messageForm.getRawValue()));
|
||||
this.messageForm.reset();
|
||||
}
|
||||
catch {
|
||||
} catch {
|
||||
const toast = await this.toastCtrl.create({
|
||||
message: 'Impossible d\'envoyer le messages.',
|
||||
duration: 2000,
|
||||
|
||||
Reference in New Issue
Block a user